Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!purdue!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.lang.c
Subject: Re: comma operator
Message-ID: <10733@smoke.BRL.MIL>
Date: 14 Aug 89 19:47:33 GMT
References: <63244@linus.UUCP> <2300@oakhill.UUCP>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 8

In article <2300@oakhill.UUCP> stevenw@oakhill.UUCP (Steven Weintraub) writes:
>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.

The usual idiom is

	while ( (ch = getchar()) != EOF && ch != '\n' )