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: Sun, 29 Sep 2024 18:39:06 -0700 Organization: A noiseless patient Spider Lines: 46 Message-ID: <86wmit2a4l.fsf@linuxsc.com> References: <86frpk3s1u.fsf@linuxsc.com> <86r0932eqj.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Mon, 30 Sep 2024 03:39:06 +0200 (CEST) Injection-Info: dont-email.me; posting-host="e153cd915235505af8c5be8b67e222a3"; logging-data="2054705"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19iO6CLjWT2K3/EnmcODnUs99WFwtoCsic=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:Q4joNU/8hO7WGrvxL4Mq8OEY+sc= sha1:sf+VXvbzLjuHr4Y10pUyKCW6GHc= Xref: csiph.com comp.lang.c:388561 Andrey Tarasevich writes: > On 09/28/24 10:47 PM, Tim Rentsch wrote: > efer? > >>> Er... The answer to his question is already present in the quoted >>> portion of my post. "The vertical spacing introduced..." >> >> Does that mean you think this >> >> if (failed) { >> ... >> } else { >> >> ... >> >> } >> >> is just as readable? Or is it something besides the >> vertical spacing that bears on your "more readable" >> judgment? > > No, the spacing in question is the spacing between the `if` > condition and the first line of the the first compound statement. My question was misquoted. I was asking about this: if (failed) { ... } else { ... } where there is a blank line after the "if()" line, both before and after the "} else {" line, and before the line with the final closing brace. This layout has as much vertical separation as the layout style you prefer (and one more blank line at the end). Do you think it is just as readable as your preferred layout? Or is it something besides the vertical spacing that bears on your "more readable" judgment?