C commenting style?

Charles Day cedayiv at gmail.com
Wed Jan 30 05:15:29 EST 2008


What is GnuCash's preferred format for adding multi-line comments within the
code of a C function?  From reading the code, I see a variety of styles
currently in use, among them:

--- Style 1 ---
/* comment line 1
 * comment line 2 */

--- Style 2 ---
/* comment line 1
   comment line 2 */

--- Style 3 ---
/* comment line 1 */
/* comment line 2 */

--- Style 4 ---
/* comment line 1
 * comment line 2
 */

--- Style 5 ---
/*
 * comment line 1
 * comment line 2
 */

--- Style 6 ---
// comment line 1
// comment line 2

My personal preference has always been style 6, because it's easier to type
and to read, but I'm happy to use use whatever. I want to add a bunch of
comments to the code so please let me know what the "official" style is, if
there is one. If the answer is "it depends", then at least tell me which
styles to definitely avoid.

Cheers,
Charles


More information about the gnucash-devel mailing list