Date: Tue, 23 Jan 2001 18:49:15 +1100 (EST) From: Iain Templeton <iain@research.canon.com.au> To: cjclark@alum.mit.edu Cc: freebsd-chat@FreeBSD.ORG Subject: Re: silly C style question Message-ID: <Pine.LNX.4.10.10101231845470.12891-100000@blow.research.canon.com.au> In-Reply-To: <20010122230447.S10761@rfx-216-196-73-168.users.reflex>
index | next in thread | previous in thread | raw e-mail
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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10101231845470.12891-100000>
