Bob Larson BLARSON%ECLD at usc-ecl.ARPA
Mon Dec 31 17:29:00 AEST 1984

Is EVERYONE ignoring the parentheses?  Or is the silent majority just
hoping this discussion will disappear?

x <binop>= y;

is similar to

x = ( x <binop> (y));

with the exception x is only evaluated once.  (If you don't think the parentheses
are needed, try * for <binop> and a+b for y.)

My other point to add to this discussion:  There are few binary operators
that do not already have such assignment operator equivalents.  I think a 
list of desired ones would be clearer.  &&= and ||= seem potentially useful,
as does ->= .  On the other hand, .= and ,= are silly, and == means something
else.  (Should I mention ===, !==, +==, +===, +====?  No, I didn't think so.)
[I am interpreting <binop> loosely here, not as listed in k&r section 18.1.
Otherwise, the potentially useful ->= would be ignored, as well as all of the
silly combinations.]

Bob Larson <Blarson at Usc-Ecl.Arpa>

More information about the Comp.lang.c mailing list