pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
The compiler reads the sections in order of appearance in the source file, not in the order specified
in the SOURCE directive. If you want the compiler to read sections in a particular order, use a
separate SOURCE directive for each section and place the SOURCE directives in the desired order.
Nesting Levels
You can nest SOURCE directives to a maximum of seven levels, not counting the original outermost
source file. For example, the deepest nesting allowed is as follows:
1. The MAIN file F sources in file F1.
2. File F1 sources in file F2.
3. File F2 sources in file F3.
4. File F3 sources in file F4.
5. File F4 sources in file F5.
6. File F5 sources in file F6.
7. File F6 sources in file F7.
Effect of Other Directives
• COLUMNS (page 418)
• LIST and NOSUPPRESS (page 418)
• NOLIST (page 418)
• USEGLOBALS and BEGINCOMPILATION (pTAL Compiler Only) (page 419)
COLUMNS
If a SOURCE directive specifies sections of a file, the compiler honors all COLUMNS directives in
that file that precede the first section of that file. (The first section of the file might not be the first
section of the file that the SOURCE directive specifies.) The compiler also honors COLUMN directives
that appear in the sections that the SOURCE directive specifies.
After a SOURCE directive completes execution, the value of COLUMNS is restored to what it was
before the SOURCE directive:
File1:
?COLUMNS 80
...
File2:
?COLUMNS 100
...
?SOURCE file1
! COLUMNS is restored to 100 at this point
LIST and NOSUPPRESS
If LIST and NOSUPPRESS are active after a SOURCE directive completes execution, the compiler
prints a line identifying the source file to which it reverts and begins reading at the line following
the SOURCE directive.
NOLIST
You can precede SOURCE with NOLIST to suppress the listings of procedures to be read in. Place
NOLIST and SOURCE on the same line, because the line containing NOLIST is not suppressed:
?PUSHLIST, NOLIST, SOURCE $src.current.routines
! Suppress listings, read in external declarations of routines
?POPLIST
418 Compiler Directives