Date: Mon, 22 Jan 2001 19:43:19 +0200 From: Mark Murray <mark@grondar.za> To: j mckitrick <jcm@FreeBSD-uk.eu.org> Cc: freebsd-chat@FreeBSD.ORG Subject: Re: silly C style question Message-ID: <200101221743.f0MHh7I61638@gratis.grondar.za> In-Reply-To: <20010122170600.D4456@dogma.freebsd-uk.eu.org> ; from j mckitrick <jcm@FreeBSD-uk.eu.org> "Mon, 22 Jan 2001 17:06:00 GMT." References: <20010122170600.D4456@dogma.freebsd-uk.eu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> This is a trivial question, but I get hung up on details, so I'm gonna ask
> anyway. ;)
OOOOOPPPPPPENNN Bikeshed! ;-)
> When using opening and closing braces for a loop or other control structure,
> most coders put the opening brace on the same line as the decision
> statement. It seems to me, using it in more of a block format would make
> the code easier to read. Does this make sense?
>
> if (0 == i)
> {
> foo(i);
> bar(i);
> }
IMHO, this wastes one line of screen space. I only use it for functions.
> versus
>
> if (0 == i) {
> foo(i);
> bar(i);
> }
"Classic" K&R. Allows a little more code per screen.
M
--
Mark Murray
Warning: this .sig is umop ap!sdn
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101221743.f0MHh7I61638>
