| Deutsch English Français Italiano |
|
<20240928203048.00006703@yahoo.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Michael S <already5chosen@yahoo.com>
Newsgroups: comp.lang.c
Subject: Re: how to make a macro work as a single line if stmt without
braces
Date: Sat, 28 Sep 2024 20:30:48 +0300
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <20240928203048.00006703@yahoo.com>
References: <PaWdnZ3R-9zI6nP7nZ2dnZfqn_GdnZ2d@brightview.co.uk>
<vcm16e$1hm2u$1@dont-email.me>
<vcn6m8$1n1vu$1@dont-email.me>
<86frpk3s1u.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 28 Sep 2024 19:30:56 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="09c4fbcd10514096497f5bffa7fed5fc";
logging-data="1423455"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19b35C+fnPP8P/asxkghz+IXkTOUaHxamY="
Cancel-Lock: sha1:/jupC+H3TEoyqkTNKBUZL2ASt3A=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
Bytes: 1919
On Sat, 28 Sep 2024 05:02:05 -0700
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
> Andrey Tarasevich <andreytarasevich@hotmail.com> writes:
>
> [...]
>
> > And don't use "Egyptian" braces [the style used in the
> > first edition of The C Programming Language, by Kernighan
> > and Ritchie].
> >
> > This is the proper formatting style with braces
> >
> > if (failed)
> > {
> > ...
> > }
> > else
> > {
> > ...
> > }
> >
> > The vertical spacing introduced by the `{` line provides
> > separation between condition and the branch, which makes
> > your code much more readable. [...]
>
> What qualities does this layout style have that make it "more
> readable", other than it being one that you like or prefer?
{ at the same level of indentation as its matching }