Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!indri!aplcen!arrom From: arrom@aplcen.apl.jhu.edu (Ken Arromdee) Newsgroups: comp.lang.c Subject: Re: lint won't verify printf formatting against variable types?? Keywords: lint, cc Message-ID: <1778@aplcen.apl.jhu.edu> Date: 30 Jun 89 05:54:46 GMT Reply-To: arrom@aplcen.apl.jhu.edu (Ken Arromdee (600.429)) Organization: Johns Hopkins University Lines: 20 if (f1(a)) /* do nothing */ ; else if (f2(a)) { /* some code */ } else if (f3(a)) { /* some code */ } else if (f4(a)) { /* some code */ } Now suppose that f1 through f4 are all conceptually related. Claim: this is clearer than the other way (with f2, f3, f4 all inside an if (!f1(a))). Or at least, if it's not obviously clearer, it's not obviously unclear either and can be considered a legitimate use of "if (condition) ;". (Of course it should always be commented though.) -- "The fact is self evident from the text and requires no supporting argument." --Tim Maroney Kenneth Arromdee (UUCP: ....!jhunix!ins_akaa; BITNET: g49i0188@jhuvm; INTERNET: arromdee@crabcake.cs.jhu.edu) (please, no mail to arrom@aplcen)