Path: utzoo!attcan!uunet!datapg!com50!jhereg!mark From: mark@jhereg.Minnetech.MN.ORG (Mark H. Colburn) Newsgroups: comp.lang.c Subject: Re: A question of style Message-ID: <436@jhereg.Minnetech.MN.ORG> Date: 2 Dec 89 14:30:58 GMT References: <547@mars.Morgan.COM> <1989Nov30.001947.14883@aqdata.uucp> <427@jhereg.Minnetech.MN.ORG> Reply-To: mark@jhereg.minnetech.mn.org (Mark H. Colburn) Organization: Open Systems Architects, Inc., Mpls, MN Lines: 20 In article <427@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@Minnetech.MN.ORG Open Systems Architects, Inc.