Function Argument Evaluation

Christopher R Volpe volpe at camelback.crd.ge.com
Wed Mar 27 23:10:51 AEST 1991


Thanks to all who pointed out to me that the value of the
left operand after assignment (meaning after the next sequence point)
may be different from the value of the right operand if the type
of the left operand is different from the type of the right operand.
For example, the value of "(intvar = 2.3)" is "2", not "2.3".
This, however, is not relevant to the question under discussion. 

The only reason the output of the program in question can be
"200 200" is because the BEHAVIOR of the PROGRAM (right Doug?) is
undefined because the program violates the "shall" rule in paragraph
2 of 3.3, which is not within a constraint. It is pointless to present
a sequence of evaluations of subexpressions in some order to "prove"
that the program can print out "200 200". It can print out anything it
pleases. 
==================
Chris Volpe
G.E. Corporate R&D
volpecr at crd.ge.com



More information about the Comp.std.c mailing list