Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Andrey Tarasevich 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 21:02:11 -0700 Organization: A noiseless patient Spider Lines: 34 Message-ID: References: <86frpk3s1u.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 29 Sep 2024 06:02:12 +0200 (CEST) Injection-Info: dont-email.me; posting-host="0abc83581b4e71f40a8d5aba138498a3"; logging-data="1707643"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9gmjS70YIKLuxdaomo8x+" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:XFRaHyx3qMh0qEasItzkfpVw8+0= Content-Language: en-US In-Reply-To: <86frpk3s1u.fsf@linuxsc.com> Bytes: 2018 On 09/28/24 5:02 AM, 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? Er... The answer to his question is already present in the quoted portion of my post. "The vertical spacing introduced..." -- Best regards, Andrey