YAAO (yet another assignment operator)
Ron Natalie <ron>
ron at brl-tgr.ARPA
Tue Dec 18 02:22:59 AEST 1984
> Dean Rubine asked for a ->= operator, but this
> is quite impossible (if you try to keep the language
> clean, of course). -> isn't an operator, it's a syntactical
> construct, like . or [expr].
Sorry, my book says that "->", ".", and "[]" are the primary expression
operators and have the highest priority.
> Also, it would be awfull to implement. In a statement
> p ->= next
> you would have to keep the type of 'p' around, and also the
> expression on the righthandside would not be an ordinary
> expression, neither a lvalue nor a rvalue, but something wierd
> (a 'selection expression'?).
I don't understand this at all. Keep the type of 'p' around? This
makes litle sense. You better keep the type of something you are storing
into around, regardless of the type of expression.
I agree, it sucks. Nowhere does it define assignment-operator as being
<generic-operator>=. It doesn't even say <binop>=.
-Ron
More information about the Comp.lang.c
mailing list