Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2000 11:49:24 +0200
From:      Neil Blakey-Milner <nbm@mithrandr.moria.org>
To:        Martin Horcicka <horcicka@dzungle.ms.mff.cuni.cz>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: style(9)
Message-ID:  <20000630114924.A78968@mithrandr.moria.org>
In-Reply-To: <Pine.BSF.3.96.1000630113615.2357A-100000@dzungle.ms.mff.cuni.cz>; from horcicka@dzungle.ms.mff.cuni.cz on Fri, Jun 30, 2000 at 11:38:36AM %2B0200
References:  <Pine.BSF.3.96.1000630113615.2357A-100000@dzungle.ms.mff.cuni.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri 2000-06-30 (11:38), Martin Horcicka wrote:
> 2. Citation:
> ============
> Indentation is an 8 character tab.  Second level indents are four spaces.
> 
> while (cnt < 20)
>         z = a + really + long + statement + that + needs +
>             two lines + gets + indented + four + spaces +
>             on + the + second + and + subsequent + lines.

> a. What does it mean `second level indents'? Is it the indentation of
>    expressions that cannot fit to one line (as in the example above) or
>    is it any indentation except of the first tab?

It's continuation lines, as the example states.  All new statements
occur on tab boundaries, whereas continuation lines are tabs to the
previous tab boundary, plus 4 spaces.

while (cnt < 20)
	if (foo == bar)
		baz();

> b. Aren't 8 characters too many?

No.  Anyway, you can set your tab size to whatever you want.  So long as
it is a _tab_, and not 2 or 4 or 8 spaces.  If you're heading into the
margin constantly, you should simplify your code, or break it up into
(preferably reusable) functions that perform one task.

Neil
-- 
Neil Blakey-Milner
Sunesi Clinical Systems
nbm@mithrandr.moria.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000630114924.A78968>