DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
C language compilers

Comments

Comments begin with the characters /* and end with the next */.

   /* this is a comment */
Comments do not nest.

If a comment appears to begin within a string literal or character constant, it will be taken as part of the literal or constant, as specified by the phases of translation.

   char *p = "/* this is not a comment */"; /* but this is */
In addition, //-style comments are accepted.
Next topic: Preprocessing
Previous topic: Wide string literals

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005