Re:Nymph: A slightly different version of C
by kazinator on Friday August 18, 2017 @01:47PM
(#15048240)
The comma operator has more uses than that. One of them is to introduce some needed side effect in a sequence of definitions, without introducing a statement (out of esthetics, or C90 compatibility concerns):
From C99 onward, this could be:
We use the comma operator in for loops because it has places in its syntax which take one expression. This limitation can arise in other contexts, like some macro MAC(E) where E must be a single expression. If want to to have two sequenced effects in there, we can use MAC((eff1, eff2)).
[ Parent
| on HN ]
There are no comments on this comment yet.