Sujet : Re: Which code style do you prefer the most?
De : anton.txt (at) *nospam* g{oogle}mail.com (Anton Shepelev)
Groupes : comp.lang.cDate : 05. Mar 2025, 13:22:24
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250305152224.ea400cb92445c78f6a4ba523@g{oogle}mail.com>
References : 1 2 3 4 5 6 7
User-Agent : Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
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. Perhaps:
if
( a != b && c != d && e != f ||
g = h() * i() && (j = k)
)
{ foo();
}
-- () ascii ribbon campaign -- against html e-mail/\ www.asciiribbon.org -- against proprietary attachments