Liste des Groupes | Revenir à cl c |
Kaz Kylheku <643-408-1753@kylheku.com> writes: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.
Which is one of the goofier styles I've seen. Although I don't recall
ever seeing it actually done that way, even in gnu code.
Les messages affichés proviennent d'usenet.