comma operator

Ken Arromdee arrom at aplcen.apl.jhu.edu
Tue Aug 15 04:29:42 AEST 1989


>while ((ch = getchar()), ch != EOF && ch != '\n')
>Although I have never been quite satisfied with this, I have never found
>a structure that does this which I find more satisfying.  Any comments
>from the peanut gallery?

while ((ch = getchar()) != EOF && ch != '\n')
--
"The fact is self evident from the text and requires no supporting argument."
  --Tim Maroney

Kenneth Arromdee (UUCP: ....!jhunix!ins_akaa; BITNET: g49i0188 at jhuvm;
     INTERNET: arromdee at crabcake.cs.jhu.edu) (please, no mail to arrom at aplcen)



More information about the Comp.lang.c mailing list