Expression sequencing query

Dik T. Winter dik at mcvax.uucp
Wed Oct 15 06:02:05 AEST 1986


In article <3769 at umcp-cs.UUCP> chris at umcp-cs.UUCP (Chris Torek) writes:
>                                        Even in Fortran I (where,
>I believe, the language specification says that (A+B)+C is requires
>doing A+B first, then result+C) I would write
>
>	RESULT = A + B
>	RESULT = RESULT + C
>
And so should it.  Once I required the expression (A - B) - C evaluated
exactly that way.  It didn't do so.  However, after removing the
parenthesis it was evaluated the way I wanted.  Counterintuitive?
-- 
dik t. winter, cwi, amsterdam, nederland
UUCP: {seismo,decvax,philabs,okstate,garfield}!mcvax!dik
  or: dik at mcvax.uucp
ARPA: dik%mcvax.uucp at seismo.css.gov



More information about the Comp.lang.c mailing list