Path: utzoo!attcan!uunet!husc6!rutgers!gatech!mcnc!rti!xyzzy!throopw From: throopw@xyzzy.UUCP (Wayne A. Throop) Newsgroups: comp.lang.c Subject: Re: Style (was: C-DATABASE B-PLUS a quick look) Message-ID: <2537@xyzzy.UUCP> Date: 28 Dec 88 17:47:38 GMT Organization: Data General, RTP NC. Lines: 34 As larger nits have lesser nits Upon their backs to bite 'em, The lesser have still lesser nits, And so ad infinitum. Chris Siebenmann (ziebmef!cks) reminds that my "correction" of an earlier code fragment is itself flawed. I had a loop as #include char *p, *s; ... for( p = s; *p; ++p ) *p = toupper( *p ); Nearly as I can tell, dpANS says that loop ought to have been for( p = s; *p ++p ) if( *p >= 0 ) *p = toupper( *p ); because all functions defined in ctype.h take arguments that are integers, but give defined results only if those integers have values representable as unsigned integer (or are the constant EOF). Thus, the test for negative values is (I *think*) necessary. Unless, of course, you are willing to otherwise ensure that s only points at strings of vanilla characters... then the loop is OK as it was. -- The program itself is the only complete description of what the program will do. --- P.J. Davis -- Wayne Throop !mcnc!rti!xyzzy!throopw