Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!amdahl!nsc!taux01!amos From: amos@taux01.UUCP (Amos Shapir) Newsgroups: comp.lang.c Subject: Re: documentation standards for C Message-ID: <343@taux01.UUCP> Date: Mon, 28-Sep-87 11:58:47 EDT Article-I.D.: taux01.343 Posted: Mon Sep 28 11:58:47 1987 Date-Received: Tue, 29-Sep-87 06:12:49 EDT References: <9500@brl-adm.ARPA> Reply-To: amos%taux01@nsc.com (Amos Shapir) Distribution: world Organization: National Semiconductor (Israel) Ltd. Home of the 32532 Lines: 28 Hdate: 6 Tishrei 5748 Personally, I like the style: if(cond) { do_something; } else { do_something_else; } This prevents an orphan 'else' from being left on the top of the next page of listing, making the impression that the 'if' above it has no 'else' part. The same is valid for while(cond) { do_it; } and especially for do { do_it; } while(cond); -- Amos Shapir (My other cpu is a NS32532) National Semiconductor (Israel) 6 Maskit st. P.O.B. 3007, Herzlia 46104, Israel Tel. +972 52 522261 amos%taux01@nsc.com (used to be amos%nsta@nsc.com) 34 48 E / 32 10 N