Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] K&R style (was Re: [PATCH] slight optimisation ...)
Home

[Freeciv-Dev] K&R style (was Re: [PATCH] slight optimisation ...)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] K&R style (was Re: [PATCH] slight optimisation ...)
From: Justin Moore <justin@xxxxxxxxxxx>
Date: Fri, 17 Aug 2001 12:31:54 -0400 (EDT)

> >Other people (like me) like && at the end better, and it's more common that
> >way in the code.
>
> I like Gautes' way; this is indent -kr2 -bbo, which puts it on the wrong
> side of the rules though.

   For the record the K&R style is at the beginning (which I prefer, too).
It's not explicity laid out, but an example is on p130 of "The C
Programming Language".  But as Trent pointed out, it's pretty evenly split
and just a matter of style.

   WRT braces around single-line statements, the K&R style relies on
indentation instead of braces.  I don't prefer this; again, it's a matter
of style. *shrug* An example can be found on p134 of the same book (and in
other places, but p134 was the first example I found after checking the
logical operator bit :)).

-jdm

Department of Computer Science, Duke University, Durham, NC 27708-0129
Email:  justin@xxxxxxxxxxx



[Prev in Thread] Current Thread [Next in Thread]