comma operator
Juhani Grano
grano at kreeta.cs.Helsinki.FI
Wed Aug 2 08:09:35 AEST 1989
Well, sometimes the comma operator _is_ nice, in my opinion.
Consider the following example:
foo = 0;
bar = 0;
for (i=0; i < burp; i++) {
rotten_action(foo, bar);
foo++;
bar++;
}
Using the comma operator here produces quite readable result:
for (foo=0, bar=0, i=0; i < burp; i++, foo++, bar++)
rotten_action(foo, bar);
But, ah well, I can already imagine the 2<<15 flames I'm gonna receive :-).
Kari.
------------------------------
Kari Grano University of Helsinki, Finland
email to: grano at cs.helsinki.fi Department of CS
"I've got a thousand telephones that don't ring"
More information about the Comp.lang.c
mailing list