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
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to