TAL Reference Manual

Compiler Directives
TAL Reference Manual526371-001
16-20
Usage Considerations
you specify a value smaller than 12, the compiler issues a warning and uses 12. If
you specify a value larger than 132, the compiler issues a warning and uses 132.
Usage Considerations
COLUMNS can appear in the compilation command or anywhere in the source code.
In the source code, COLUMNS if present must be the first or only directive in the
directive line. If it is not the first or only directive in the directive line, the compiler
issues a diagnostic message and ignores COLUMNS and any remaining directives on
that line. This ordering is not enforced if COLUMNS appears in the compilation
command.
Recommended Uses
Normally, you specify COLUMNS at the beginning of the source code preceding any
SECTION directive. You can set the
columns-value as follows:
If a source file has no unprefixed comments at the ends of lines, specify a
columns-value of 132 to prevent lines from being truncated in the event this file is
sourced in by a file that has a smaller
columns-value. Unprefixed comments begin
without the dash (--) or exclamation point (!) prefix.
If a source file has unprefixed comments at the ends of lines, specify a columns-
value that allows the compiler to ignore the comments.
Although a source file can include any number of COLUMNS directives, varying the
columns-value throughout the file is not recommended.
Context of the Columns Value
The columns-value in effect at any given time depends on the context, as follows:
The main input file initially assumes the columns-value set by the last COLUMNS
directive in the compilation command. If no COLUMNS directive appears, the main
input file initially assumes a
columns-value of 132.
At each SOURCE directive, each sourced-in file initially assumes the columns-
value in effect when the SOURCE directive appeared.
At each SECTION directive, the columns-value is set by the last COLUMNS
directive before the first SECTION directive in the sourced-in file. If no such
COLUMNS directive appears, each SECTION initially assumes the
columns-value
in effect at the beginning of the sourced-in file.
Within a section, a COLUMNS directive sets the columns-value only until the next
COLUMNS or SECTION directive or the end of the file.
After a SOURCE directive completes execution (that is, after all sections listed in
the SOURCE directive are read or the end of the file is reached), the compiler
restores the
columns-value to what it was when the SOURCE directive appeared.