Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch 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 05:02:05 -0700 Organization: A noiseless patient Spider Lines: 25 Message-ID: <86frpk3s1u.fsf@linuxsc.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sat, 28 Sep 2024 14:02:06 +0200 (CEST) Injection-Info: dont-email.me; posting-host="8f5b490802ead3c9705b43cb022c8c76"; logging-data="1286855"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19aFEa9+ubMicSqOTk5m1SW3H2Pxe3ym6Q=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:Wk4vfM4+VUsOUogedeCKlVgy7Ag= sha1:qYTsL2zEVh29ZmyIy96OiBrDPtE= Xref: csiph.com comp.lang.c:388539 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?