HP C A.06.05 Reference Manual
Program Organization
Lexical Elements
Chapter 2 9
Comments
A comment is any series of characters beginning with /* and ending with */. The compiler
replaces each comment with a single space character.
HP C allows comments to appear anywhere in the source file except within identifiers or
string literals. The C language does not support nested comments.
In the following example, a comment follows an assignment statement:
average = total / number_of_components; /* Find mean value. */
Comments may also span multiple lines, as in:
/*
This is a
multi-line comment.
*/
Identifiers
Identifiers, also called names, can consist of the following:
• Letters (ISO Latin-1 decimal values 65-90 and 97-122)
• Digits
• Dollar sign ($) (HP C extension)
• Underscore (_)
The first character must be a letter, underscore or a $ sign. Identifiers that begin with an
underscore are generally reserved for system use. The ANSI/ISO standard reserves all names
that begin with two underscores or an underscore followed by an uppercase letter for system
use.
NOTE HP C allows the dollar sign ($) in identifiers, including using the $ in the first
character, as an extension to the language.
Identifiers cannot conflict with reserved Keywords.