Date: Fri, 20 Jul 2001 14:48:39 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: Bruce Evans <bde@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 style.9 Message-ID: <20010720144839.F65677@sunbay.com> In-Reply-To: <Pine.BSF.4.21.0107202121300.9566-100000@besplex.bde.org>; from bde@zeta.org.au on Fri, Jul 20, 2001 at 09:35:41PM %2B1000 References: <20010720113310.C30828@sunbay.com> <Pine.BSF.4.21.0107202121300.9566-100000@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 20, 2001 at 09:35:41PM +1000, Bruce Evans wrote:
[...]
> I think, strictly speaking, `if' after `else' begins a new clause so it needs
> a first-level indent:
>
> if (...) {
> ...
> } else {
> if (...) {
> ...
> } else {
> if (...) {
> ...
> }
> }
> }
>
> but `else if' is idiomatic -- no one writes an else-if ladder like the above.
> Anyway, the continuation indent rule is at the lexical level, so it doesn't
> apply to `else if'.
>
Doh, and why I have removed that final `else' part? :-)
What I was talking about was:
if (mylevel == SLC_DEFAULT) {
slctab[(int)func].current.flag = flag;
slctab[(int)func].current.val = val;
flag |= SLC_ACK;
} else if (hislevel == SLC_CANTCHANGE &&
mylevel == SLC_CANTCHANGE) {
flag &= ~SLC_LEVELBITS;
flag |= SLC_NOSUPPORT;
slctab[(int)func].current.flag = flag;
} else {
...
}
Should that be written as shown?
Thanks,
--
Ruslan Ermilov Oracle Developer/DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010720144839.F65677>
