Re: Tutorial and guidelines: Coding standards (long message)

From: Generic Usenet Account (usenet_at_sta.samsung.com)
Date: 06/06/04

  • Next message: Ben Pfaff: "Re: Tutorial and guidelines: Coding standards (long message)"
    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


  • Next message: Ben Pfaff: "Re: Tutorial and guidelines: Coding standards (long message)"

    Relevant Pages

    • Re: Tutorial and guidelines: Coding standards (long message)
      ... > I think it's better to discuss the coding standards in one batch to ... > even if a true divider line is needed. ... > The opening braces of a block statement should always be on the end of ...
      (comp.programming)
    • Re: Tutorial and guidelines: Coding standards (long message)
      ... > I think it's better to discuss the coding standards in one batch to ... > even if a true divider line is needed. ... > The opening braces of a block statement should always be on the end of ...
      (comp.unix.programmer)
    • Re: CPAN Install Problem
      ... 'C:\Program' is not recognized as an internal or external command, ... operable program or batch file.' ...
      (perl.beginners)
    • Re: Info request - LNER J27 no. 1056
      ... round-top toolboxes and NER tapered buffers with collar. ... the original batch they were built for up to WW2, ... No info on the pickup gear or the ...
      (uk.rec.models.rail)