Path: utzoo!attcan!uunet!mtndew!friedl From: friedl@mtndew.UUCP (Stephen J. Friedl) Newsgroups: comp.lang.c Subject: Re: An overview ... Summary: y Message-ID: <461@mtndew.UUCP> Date: 4 Jul 90 16:00:39 GMT References: <1990Jul1.065531.18620@acc.stolaf.edu> <1990Jul4.020809.7619@melba.bby.oz.au> Distribution: comp Organization: VSI*FAX Tech Center Lines: 45 > My solution: Photocopy the table on page 49 of K&R1 (Page 53 of K&R2 > is not as neat looking), and stick it on the wall next to your screen. Alternatively, stick this in /usr/local/bin: I use this all the time and this trivial little script has been handy time and time again (it fits on one screen without having to use more!). #------------------------------- cut here --------------------------- # opchart.sh # # Description: # # This simply prints a C operator precedence chart on # stdout. It is taken right from K&R, page 49. cat << 'EOF' C operator precedence/associativity chart Arity Operator Assoc -------------------------------------------------------------- binary () [] -> . l -> r unary ! ~ ++ -- - (type) * & sizeof r -> l binary * / % l -> r binary + - l -> r binary << >> l -> r binary < <= > >= l -> r binary == != l -> r binary & l -> r binary ^ l -> r binary | l -> r binary && l -> r binary || l -> r ternary ?: r -> l binary = += -= *= /= %= >>= <<= &= ^= |= r -> l binary , l -> r -------------------------------------------------------------- From K&R, p 49 EOF #------------------------------- cut here --------------------------- -- Stephen J. Friedl, KA8CMY / Software Consultant / Tustin, CA / 3B2-kind-of-guy +1 714 544 6561 / friedl@mtndew.Tustin.CA.US / {uunet,attmail}!mtndew!friedl "Show me a good loser and I'll show you a loser" - Roger Penske