A question of style
Mark H. Colburn
mark at jhereg.Minnetech.MN.ORG
Sun Dec 3 01:30:58 AEST 1989
In article <427 at jhereg.Minnetech.MN.ORG> I write:
>The code above could be written as
>
> while (c = getchar && c != EOF) {
> ...
> }
Hmmm. Hopefully I can point out my own error before someone else does.
This will work on most interactive terminals under Unix since most tty
drivers assume that a NUL is a pad character but it looses on anything
that will recognize a NUL ('\0') character as a valid character on the
input stream. In those cases, the ',' would be the only choice if you did
not want to split the statement into to parts.
--
Mark H. Colburn mark at Minnetech.MN.ORG
Open Systems Architects, Inc.
More information about the Comp.lang.c
mailing list