Path: utzoo!utgpu!watserv1!watmath!att!att!pacbell.com!ucsd!usc!apple!bionet!hayes.ims.alaska.edu!floyd From: floyd@hayes.ims.alaska.edu (Floyd Davidson) Newsgroups: comp.lang.c Subject: Re: Comparing strings... Message-ID: <1990Oct24.033103.2979@hayes.ims.alaska.edu> Date: 24 Oct 90 03:31:03 GMT References: <3330@idunno.Princeton.EDU> <11486@alice.att.com> <444@mole-end.UUCP> Organization: University of Alaska Fairbanks Lines: 31 In article <444@mole-end.UUCP> mat@mole-end.UUCP (Mark A Terribile) writes: >IMnsHO, the semicolon null statement is one of the more irritating glitches >in C. I prefer > > for( ; *s && *s == *t; s++, t++ ) > {} > >or > > while( . . . ) > {} > >It's quite clear that this is an empty, no-effect statement. It's a brace- >thing where you expect a brace-thing, and it won't get missed on a faint >printout the way a semicolon can be. A simple alternative: for ( ... ) { /* null statement */; } Reformat to whatever style of indents or braces pleases your taste. Floyd -- Floyd L. Davidson floyd@hayes.ims.alaska.edu 8347 Richardson Hwy. floydd@chinet.chi.il.us Salcha, AK 99714 [and related to Alascom, Inc. by a pay check, only]