& operator
Dave Lukes
dave at taurus.UUCP
Tue Dec 20 21:12:26 AEST 1983
Uh-uh:
if(*in++ == *in++)
is NOT a sensible way to see if the first two characters of a string are
equal: ask lint, it will say something like: `in: evaluation order undefined'.
Also, for those of little faith, there are actually C compilers that
will take the non-obvious meaning of this (e.g. the PDP-11 cc), and do
the tests then do both increments in one go after the statement,
so BE WARNED,
Yours in an arbitrary evaluation order
Dave Lukes
<United Kingdom>!ukc!hirst1!minotaur!dave
More information about the Comp.lang.c
mailing list