Path: utzoo!utgpu!watmath!att!pacbell!ames!pasteur!ucbvax!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!wuarchive!swbatl!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: comma operator Message-ID: <5567@ficc.uu.net> Date: 7 Aug 89 12:22:18 GMT References: <10099@mpx2.mpx.com> <93@microsoft.UUCP> <10100@mpx2.mpx.com> <1938@softway.oz> Organization: Xenix Support, FICC Lines: 20 In article <1938@softway.oz>, stephenf@softway.oz (Stephen Frede) writes: > while ( printf("enter a number: "), scanf("%f", &num) == 1 ) > ... /* calculations on num */ Only because C doesn't have a general looping construct. I once suggested this syntax: [do statement] [while(expr) statement] Which includes both standard do...while, and while. Unfortunately it's also even more susceptible to typos than regular do...whiles, so I got roundly rejected. -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Business: peter@ficc.uu.net, +1 713 274 5180. | "The sentence I am now Personal: peter@sugar.hackercorp.com. `-_-' | writing is the sentence Quote: Have you hugged your wolf today? 'U` | you are now reading"