Deutsch English Français Italiano |
<86frpk3s1u.fsf@linuxsc.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!npeer.as286.net!npeer-ng0.as286.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch <tr.17687@z991.linuxsc.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 05:02:05 -0700 Organization: A noiseless patient Spider Lines: 25 Message-ID: <86frpk3s1u.fsf@linuxsc.com> References: <PaWdnZ3R-9zI6nP7nZ2dnZfqn_GdnZ2d@brightview.co.uk> <vcm16e$1hm2u$1@dont-email.me> <vcn6m8$1n1vu$1@dont-email.me> 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= Bytes: 1751 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?