Evaluation of if's
Blair P. Houghton
bhoughto at nevin.intel.com
Sun Jun 16 05:50:10 AEST 1991
In article <20575 at crdgw1.crd.ge.com> volpe at camelback.crd.ge.com (Christopher R Volpe) writes:
>In article <1991Jun13.184843.508 at ulkyvx.bitnet>, pgheit01 at ulkyvx.bitnet writes:
>|>*ALWAYS* (unless you tell it not to)
>
>How do you tell it not to short circuit "&&" or "||"??? You can't.
Not as such, but,
... ( e1 && e2 ) ...
is the same as
v1 = e1;
v2 = e2;
... ( v1 && v2 ) ...
If you want the order of evaluation of expressions
to be defined, then define the order of evaluation by
evaluating them in that order. The language defines
many ways to evaluate expressions in a defined order.
--Blair
"It won't kill you, nor
will anyone who has anything
better to do laugh at you."
More information about the Comp.lang.c
mailing list