HP C A.06.05 Reference Manual

Program Organization
Lexical Elements
Chapter 28
Lexical Elements
C language programs are composed of lexical elements. The lexical elements of the C
language are characters and white spaces that are grouped together into tokens. This section
describes the following syntactic objects:
White Space, Newlines, and Continuation Lines
Spreading Source Code Across Multiple Lines
Comments
Identifiers
Keywords
White Space, Newlines, and Continuation Lines
In C source files, blanks, newlines, vertical tabs, horizontal tabs, and form feeds are all
considered to be white space characters.
The main purpose of white space characters is to format source files so that they are more
readable. The compiler ignores white space characters, except when they are used to separate
tokens or when they appear within string literals.
The newline character is not treated as white space in preprocessor directives. A newline
character is used to terminate preprocessor directives. See Overview of the Preprocessor for
more information.
The line continuation character in C is the backslash (\). Use the continuation character at
the end of the line when splitting a quoted string or preprocessor directive across one or more
lines of source code.
Spreading Source Code Across Multiple Lines
You can split a string or preprocessor directive across one or more lines. To split a string or
preprocessor directive, however, you must use the continuation character (\) at the end of the
line to be split; for example:
#define foo_macro(x,y,z) ((x) + (y))\
* ((z) - (x))
printf("This is an very, very, very lengthy and \
very, very uninteresting string.");