nonportable code or incorrect compilers?
Rob Carriere
rob at kaa.eng.ohio-state.edu
Sun Jul 10 10:09:10 AEST 1988
In article <8228 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>)
writes:
>In article <374 at accelerator.eng.ohio-state.edu> rob at raksha.eng.ohio-state.edu
>(Rob Carriere) writes: [...]
>>Sounds like the type cast is not going to be done => 800 is right.
>I didn't see any cast operator. If you mean type conversion,
>one IS supposed to be done in order to evaluate a*b where a is
>an int and b is a double. Then the assignment to a should
>truncate the double expression value back to an int.
Whoops. You didn't see it because it isn't there, I *did* mean
conversion. 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*.
Rob Carriere
More information about the Comp.std.c
mailing list