nonportable code or incorrect compilers?
Doug Gwyn
gwyn at brl-smoke.ARPA
Fri Jul 29 05:58:38 AEST 1988
In article <376 at accelerator.eng.ohio-state.edu> rob at kaa.eng.ohio-state.edu (Rob Carriere) writes:
>However, the conversion rule says that a is to be
>converted to double; this seems to contradict the idea that a is to be
>computed *once*.
That's not the rule.
a op= b
(where a and b are expressions) is equivalent to
a = a op b
EXCEPT that the expression a is EVALUATED only once.
I.e. if evaluation of the expression a has side-effects,
they will occur only once.
Once the expression is evaluated, it is used in the context
a = a op b
and other stuff happens at that point.
More information about the Comp.std.c
mailing list