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


2.6 Comments

All comments shall be C-style comments, of the form ‘/* … */’.

Comments shall be placed only on a line by themselves. They shall not be placed together with code, variable declarations, or other non-comment entities. A comment should be placed immediately preceding the entity it describes.

Acceptable:

/* The page # that is the front buffer.  */
int displayed_page;
/* The page # that is the back buffer.  */
int render_page;

Unacceptable:

int displayed_page;           /* The page # that is the front buffer. */
int render_page;              /* The page # that is the back buffer. */