From owner-freebsd-chat Mon Jan 22 23:49:35 2001 Delivered-To: freebsd-chat@freebsd.org Received: from kwanon.research.canon.com.au (kwanon.research.canon.com.au [203.12.172.254]) by hub.freebsd.org (Postfix) with ESMTP id 541C537B401 for ; Mon, 22 Jan 2001 23:49:17 -0800 (PST) Received: from bellmann.research.canon.com.au (bellmann.research.canon.com.au [10.5.0.3]) by kwanon.research.canon.com.au (Postfix) with ESMTP id F193E8A896; Tue, 23 Jan 2001 07:56:16 +0000 (UTC) Received: from elph.research.canon.com.au (elph.research.canon.com.au [203.12.174.253]) by bellmann.research.canon.com.au (Postfix) with ESMTP id 34C4E8B10; Tue, 23 Jan 2001 18:41:25 +1100 (EST) Received: from blow.research.canon.com.au (blow.research.canon.com.au [10.8.1.4]) by elph.research.canon.com.au (Postfix) with ESMTP id 688B43D0; Tue, 23 Jan 2001 18:49:02 +1100 (EST) Date: Tue, 23 Jan 2001 18:49:15 +1100 (EST) From: Iain Templeton To: cjclark@alum.mit.edu Cc: freebsd-chat@FreeBSD.ORG Subject: Re: silly C style question In-Reply-To: <20010122230447.S10761@rfx-216-196-73-168.users.reflex> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 22 Jan 2001, Crist J. Clark wrote: > On Mon, Jan 22, 2001 at 05:31:44PM -0800, Freddie Cash wrote: > > Bah! If you are worried about screen space and legibility, there's > > always the following: > > > > if (0==i) > > { foo(i); > > bar(i); > > } > > Everyone knows it should be, > > Or, > > if ( > i > == > 0 > ) > { > foo( > i > ) > ; > > bar( > i > ) > ; > } > Wow, that is way too close to our standard C style here... although we use 4 space tabs... if ( i == 0 ) { foo ( i ); bar ( i ); } Although, we only do that for really long lines so they fit within 80ish characters, or for really complex logical expressions. I didn't like it at first, but I can see the benefits after having to figure out some code. -- Iain Templeton, Software Engineer (allegedly) Canon Information Systems Research Australia To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message