[comp.lang.c] c operator precedence and order of evaluation table in tbl

pb@idca.tds.PHILIPS.nl (Peter Brouwer) (01/17/90)

Here is a a table of the evaluation order of c operators , use tbl and
[nt]roff to print.
.TS
center box tab(;);
cp16B s s s s s s s s s
cp16B s s s s s s s s s
cp14I  s s s s s s s s | cp14I
cp15 cp15 cp15 cp15 cp15 cp12 cp15 cp15 cp12 | l.
Precedence and order of evaluation
\^
=
operator;Associativity
_
();[];->;.;;;;;;left to right;
_
!;~;++;--;-;(type);*;&;sizeof;right to left;
_
*;/;%;;;;;;;left to right;
_
+;-;;;;;;;;left to right;
_
<<;>>;;;;;;;;left to right;
_
<;<=;>;>=;;;;;;left to right;
_
==;!=;;;;;;;;left to right;
_
&;;;;;;;;;left to right;
_
^;;;;;;;;;left to right;
_
|;;;;;;;;;left to right;
_
&&;;;;;;;;;left to right;
_
| |;;;;;;;;;left to right;
_
? :;;;;;;;;;right to left;
_
 =;+=;-=;etc;;;;;;right to left;
_
,;;;;;;;;;left to right;
.TS
-- 
Peter Brouwer,                # Philips Telecommunications and Data Systems,
NET  : pb@idca.tds.philips.nl # Department SSP-P9000 Building V2,
UUCP : ....!mcvax!philapd!pb  # P.O.Box 245, 7300AE Apeldoorn, The Netherlands.
PHONE:ext [+31] [0]55 432523, # 

walter@hpclwjm.HP.COM (Walter Murray) (01/20/90)

Peter Brouwer writes:

> Here is a a table of the evaluation order of c operators , use tbl and
> [nt]roff to print.

> [Table deleted]

Thanks!  

Here are a couple of suggested corrections:

1.  (type) should go on a line by itself, following the line with
    the true unary operators.

2.  Add + to the line with the other unary operators (ANSI only).

Walter Murray
-------------