Deutsch   English   Français   Italiano  
<20250225104754.267@kylheku.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Kaz Kylheku <643-408-1753@kylheku.com>
Newsgroups: comp.lang.c
Subject: Re: Which code style do you prefer the most?
Date: Tue, 25 Feb 2025 18:51:51 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <20250225104754.267@kylheku.com>
References: <vpkmq0$21php$1@dont-email.me> <vpl2k4$24fmt$1@dont-email.me>
Injection-Date: Tue, 25 Feb 2025 19:51:51 +0100 (CET)
Injection-Info: dont-email.me; posting-host="e055f70581afeebe4ecddb5b3ecb3679";
	logging-data="2254224"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+DY52LoHeFqkDi+N20WGIcryZiXfXtTGo="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:cWwcM+29PpZzU4TXFG0YjphP53o=
Bytes: 1804

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/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca