=op in C (was: braces)

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Dec 17 14:33:33 AEST 1988


In article <2151 at uokmax.UUCP> randy at uokmax.UUCP (Longshot) writes:
>As an interesting aside, the cc here on our Multimax will generate warnings for
>	x=-y;	/* x = -y or x =- y? */

Sigh.  Not only is this not a UNIX-WIZARDS issue, it's not even
much of a C issue.  I don't know HOW many books explain this,
but it's a lot!  =op used to be the way that the assignment
operators were written.  When that was officially changed to
op= (in order to avoid user errors in cases like =- vs. = -),
the old =op form was still supported for a while, at first with
a warning and the old meaning, then with a warning and the new
meaning, now without a warning and with the new meaning.  Some
compilers are behind the times.



More information about the Comp.unix.wizards mailing list