Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Michael S 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: <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 wrote: > Andrey Tarasevich 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 }