pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

Directive Stacks
Each of these directives has a compile-time directive stack onto which you can push, and from
which you can pop, directive settings:
CHECKSHIFTCOUNT (page 384)
DEFEXPAND (page 386)
DO_TNS_SYNTAX (page 389)
GP_OK (page 397)
INNERLIST (page 400)
LIST (page 401)
MAP (page 402)
OVERFLOW_TRAPS (page 406)
REFALIGNED (page 410)
Each directive stack is 31 levels deep.
Topics:
Pushing Directive Settings (page 369)
Popping Directive Settings (page 369)
Example (page 369)
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. No diagnostic message is issued if too many items
are pushed onto the stack.
Popping Directive Settings
To restore the top value from a directive stack as the current setting from 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. No diagnostic message is issued if
too many items are popped from the stack.
Example
In Example 327 (page 370):
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 procedures included by the SOURCE directive.
4. POPLIST pops the top value from the LIST directive stack and restores LIST as the current setting
for the remainder of the source file.
Directive Stacks 369