Deutsch English Français Italiano |
<vq9kf0$2efj9$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c Subject: Re: Which code style do you prefer the most? Date: Wed, 5 Mar 2025 14:44:00 +0100 Organization: A noiseless patient Spider Lines: 27 Message-ID: <vq9kf0$2efj9$1@dont-email.me> References: <vpkmq0$21php$1@dont-email.me> <20250304175602.c9fe683d678d3a2ed101a4ac@g{oogle}mail.com> <vq75k8$1t6ut$2@dont-email.me> <vq785i$1u7v7$1@dont-email.me> <20250304101022.154@kylheku.com> <vq7shq$226p3$1@dont-email.me> <vq7u5u$21gol$2@dont-email.me> <20250305152224.ea400cb92445c78f6a4ba523@g{oogle}mail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 05 Mar 2025 14:44:01 +0100 (CET) Injection-Info: dont-email.me; posting-host="0de849828b6f453f948c10bb5b55e719"; logging-data="2571881"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FTlyPFrdLLUqHwGz+j1BIJhB8os9/HpM=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:WnrRad5zId7yrXLRMtDY30eyV7s= Content-Language: en-GB In-Reply-To: <20250305152224.ea400cb92445c78f6a4ba523@g{oogle}mail.com> Bytes: 2189 On 05/03/2025 13:22, Anton Shepelev wrote: > Richard Heathfield: > >> I like to break after a binary operator so that it is >> syntactically obvious that the line must continue: >> >> if((a != b && >> c != d && >> e != f) || >> (g = h() * i() && >> (j = k)) >> { >> foo(); >> } >> >> (You'll be glad to hear that that's not a direct quote!) > > There is no way I like for the formatting of multiline > conditions in if()'s. Agreed. The correct (IMNO, of course) way to re-format the code above is to throw it out and start again. There is no way to make it clear in a single expression. (The appropriate way to organise the final result will depend on what these different identifiers actually are in real code.)