Re: Tutorial and guidelines: Coding standards (long message)
From: Generic Usenet Account (usenet_at_sta.samsung.com)
Date: 06/06/04
- Previous message: Klaus Petersen: "Wrapping shared object functions?"
- In reply to: Otto Wyss: "Tutorial and guidelines: Coding standards (long message)"
- Next in thread: Ben Pfaff: "Re: Tutorial and guidelines: Coding standards (long message)"
- Reply: Ben Pfaff: "Re: Tutorial and guidelines: Coding standards (long message)"
- Reply: Måns Rullgård: "Re: Tutorial and guidelines: Coding standards (long message)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 6 Jun 2004 11:05:15 -0700
otto.wyss@orpatec.ch (Otto Wyss) wrote in message news:<1geynz8.10e0pca3zu000N%otto.wyss@orpatec.ch>...
> I think it's better to discuss the coding standards in one batch to
> finish it in one week even if the message is rather long.
>
<snip>
> 11.3 Statements
>
> A statement usually should fit on a single visible line (if possible).
> If not, it has to be divided on an obvious point, after an operator or
> after a separator (i.e. ","). This means the operator or separator
> should be on the end of the line and not at the beginning of the next
> line. A multi line statement should be indented to the functional same
> point as the start line.
>
> Multiple statements shouldn't be put on the same line unless they belong
> together as if they were a single statement.
>
>
<snip>
>
> Remark about "else": Instead of writing braces around "else" on separate
> lines (totalling 3 lines), it should be written "}else{" (just on line).
> The lines with just one brace look rather similar as just white space
> and imply a divider line where none is. So better use always "}else{"
> even if a true divider line is needed. If you more like to use "} else
> {" just go ahead.
>
>
<snip>
>
> The opening braces of a block statement should always be on the end of
> the starting line, not on the beginning of the next (see 11.3).
>
>
Hasn't the "K&R style" been superceded by the "modern style"? Is this
an attempt to resurrect the "K&R style"?
--Bhat
- Previous message: Klaus Petersen: "Wrapping shared object functions?"
- In reply to: Otto Wyss: "Tutorial and guidelines: Coding standards (long message)"
- Next in thread: Ben Pfaff: "Re: Tutorial and guidelines: Coding standards (long message)"
- Reply: Ben Pfaff: "Re: Tutorial and guidelines: Coding standards (long message)"
- Reply: Måns Rullgård: "Re: Tutorial and guidelines: Coding standards (long message)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|