Path: utzoo!attcan!uunet!samsung!rex!ames!eos!shelby!csli!poser From: poser@csli.Stanford.EDU (Bill Poser) Newsgroups: comp.lang.c Subject: Re: A question of style Message-ID: <11139@csli.Stanford.EDU> Date: 25 Nov 89 19:36:49 GMT References: <1989Nov23.170838.10376@phri.nyu.edu> Sender: poser@csli.Stanford.EDU (Bill Poser) Reply-To: poser@csli.stanford.edu (Bill Poser) Organization: Center for the Study of Language and Information, Stanford U. Lines: 18 In article <1989Nov23.170838.10376@phri.nyu.edu> roy@phri.nyu.edu (Roy Smith) writes: >Would you be confused and/or grossed out if you saw: > > if (something) > perror ("message"), exit(1); >-- In addition to having a hidden control structure, I strongly urge you not to omit braces. I would write: if(something){ somethingelse } This makes the structure much clearer when this is embedded in a lot of other code, and reduces the likelihood of errors when you add something to the action taken if the condition is true.