C commenting style?

Charles Day cedayiv at gmail.com
Mon Feb 4 16:42:44 EST 2008


Based on this small sample of opinions, it looks like there is a preference
for style 6 but that it causes too much trouble with certain picky compilers
left over from Ancient Rome. Also avoid styles 2 and 3.

So I'll go with style 5 for comments that I want to stand out, and style 1
for comments that I don't.

Thanks for all the responses,
Charles

"Charles Day" <cedayiv at gmail.com> writes:
>
> > 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
> > _______________________________________________
> > gnucash-devel mailing list
> > gnucash-devel at gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-devel
> >
> >
>
> --
>       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>       Member, MIT Student Information Processing Board  (SIPB)
>       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
>       warlord at MIT.EDU                        PGP key available
>


More information about the gnucash-devel mailing list