C associativity rules
Doug Gwyn
gwyn at smoke.ARPA
Thu Sep 22 10:09:56 AEST 1988
In article <804 at proxftl.UUCP> francis at proxftl.UUCP (Francis H. Yu) writes:
>"a && b" is a control structure which implies
> "if (a) if (b) ... "
>It has nothing to do with the order of evaluation of expression.
That is quite wrong. "&&" is a binary operator", a && b" is an
expression, and the subexpression "a" is required to be evaluated.
Then, if the value of "a" is nonzero, the expression "b" is required
to be evaluated; otherwise "b" is required to NOT be evaluated. The
following C statements are legal and useful:
c = a && b;
d = e + (a && b);
More information about the Comp.lang.c
mailing list