Unnecessary parenthesis

Stephen J. Friedl friedl at vsi.UUCP
Sun Jul 3 11:26:13 AEST 1988


In article <8209 at brl-smoke.ARPA>, gwyn at brl-smoke.ARPA (Doug Gwyn ) writes:
> (Most C programmers I know have a copy of the chart from
> K&R 1st Ed. p. 49 taped up near their terminal.)

We've found it most helpful to have a little command "opchart"
that does this (and it fits on one screen quite nicely):

#------------------------ cut here ---------------------------
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 ---------------------------

    Steve
-- 
Steve Friedl     V-Systems, Inc. (714) 545-6442     3B2-kind-of-guy
friedl at vsi.com     {backbones}!vsi.com!friedl    attmail!vsi!friedl
-----------Nancy Reagan on John DeLorean: "Just say snow"----------



More information about the Comp.lang.c mailing list