C/C++ Programmer's Guide (G06.25+)

Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
13-15
COLUMNS
COLUMNS
The COLUMNS pragma specifies the maximum logical line length of the source file.
last-column
specifies the last column in a source line to process. The compiler ignores any text
in the line beyond this column. last-column must be in the range 20–32767.
The pragma default settings are:
Usage Guidelines
The COLUMNS pragma can be entered on the compiler RUN command line or in the
source text. If it is included in the source file, the COLUMNS pragma must appear
before any SECTION pragmas.
If you do not use the COLUMNS pragma, the compiler processes the full length of
each source line.
The COLUMNS pragma can be specified only once in each source file and it must
be the only text in the source line.
The COLUMNS pragma causes physical source lines after last-column to be
truncated before the C preprocessor begins the translation phase.
The COLUMNS pragma currently in effect depends on the context, as follows:
°
The main input file uses the last-column value specified in a COLUMNS
pragma. If no COLUMNS pragma is specified, the compiler processes the full
length of each source line.
°
At each #include directive, each included file initially assumes the
last-column value in effect when the #include directive appeared.
If a COLUMNS pragma is specified in the included file, the compiler uses the
last-column value specified.
°
After a #include directive completes execution (that is, after the end of file is
reached), the compiler restores the last-column value to what it was when
the #include directive appeared.
COLUMNS last-column
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler Not set Not set
G-series TNS c89 utility Not set Not set
TNS/R native C and C++ compilers Not set Not set
Native c89 utility Not set Not set
TNS/E native C and C++ compilers Not set Not set