Sujet : Re: Which code style do you prefer the most?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 25. Feb 2025, 19:51:51
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250225104754.267@kylheku.com>
References : 1 2
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-02-25, John McCue <
jmccue@reddwf.jmcunx.com> wrote:
Ar Rakin <rakinar2@onesoftnet.eu.org> wrote:
Hello there,
I've been writing C code for a long time, in different styles, but
always wanted to know which code style most people prefer. This is all
about that question. Which one of the following do you prefer the most?
>
GNU Style for me.
OP didn't properly characterize GNU style.
GNU style is actually something like this:
if (flag)
{
switch (state)
{
case 42:
{
state = 73;
break;
}
}
}
else
{
statement;
}
Four space indentation, but braces half-indent by two spaces.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca