order-of-evaluation

utzoo!utcsrgv!utcsstat!wagner utzoo!utcsrgv!utcsstat!wagner
Sun Mar 6 10:29:49 AEST 1983


To add more fuel to the fire, I think the example of 
something = foo(i++)
MUST pass the incremented value of i to foo; the standard
allows you flexibility of evaluation, but not the option of
avoiding evaluation of expressions passed to functions.
If foo can see another copy of i (perhaps it is global), the
two versions may differ, since you dont know that i was stored
back into until the end of the statement.

Michael Wagner, UTCS



More information about the Comp.lang.c mailing list