TAL Programmer's Guide
Using Directive Stacks
Compiling Programs
14–8 096254 Tandem Computers Incorporated
Using Directive Stacks Several directives have a compile-time directive stack on which you can push and pop
directive settings. Directives that have directive stacks are:
CHECK
CODE
DEFEXPAND
ICODE
INNERLIST
INT32INDEX
LIST
MAP
Each directive stack is 32 levels deep. The compiler initially sets all levels of each
directive stack to the off state.
Pushing Directive Settings When you push the current directive setting onto a directive stack, the current
directive setting of the source file remains unchanged until you specify a new directive
setting.
To push a directive setting onto a directive stack, specify the directive name prefixed
by PUSH. For example, to push the current setting of the LIST directive onto the LIST
directive stack, specify PUSHLIST. The other values in the directive stack move down
one level. If a value is pushed off the bottom of the directive stack, that value is lost.
Popping Directive Settings To restore the top value from a directive stack as the current setting of the source file,
specify the directive name prefixed by POP. For example, to restore the top value off
the LIST directive stack, specify POPLIST. The remaining values in the directive stack
move up one level, and the vacated level at the bottom of the stack is set to the off
state.
Directive Stack Example In the following example:
1. LIST is the default setting for the source file.
2. PUSHLIST pushes the LIST directive setting onto the LIST directive stack.
3. NOLIST suppresses listing of sourced-in procedures.
4. POPLIST pops the top value off the LIST directive stack and restores LIST as the
current setting for the remainder of the source file:
!LIST is the default setting for the source file
?PUSHLIST, NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS (
? PROCESS_GETINFO_, FILE_OPEN_, WRITEREADX, READX)
?POPLIST