Previous: Comments, Up: Coding style [Contents][Index]

### 2.7 Multi-Line Comments

Comments spanning multiple lines shall be formatted with all lines after the first aligned with the first line. Asterisk characters should be repeated at the start of each subsequent line.

Acceptable:

    /*
     * This is a comment
     * which spans multiple lines.
     * It is long.
     */

Unacceptable:

    /* This is a comment
       which spans multiple lines.
       It is long. */

    /*
     * This is a comment
     * which spans multiple lines.
     * It is long. */

    /* This is a comment
     * which spans multiple lines.
     * It is long.
     */

In particular first unacceptable form makes comment difficult to distinguish from the code itself. Especially if it contains the code snippets and/or is long. So, its usage is disallowed.