FORTRAN Reference Manual
Compiler Directives
FORTRAN Reference Manual—528615-001
10-54
PUSH Compiler Directive
PUSH Compiler Directive
The PUSH directive causes the current state of a compiler directive to be saved in a 
push-down stack where it can be restored by a later POP directive specifying the same 
directive. The PUSH directive does not change the state of the subject directive.
directive
is any of the following FORTRAN compiler directives:
BOUNDSCHECK
CODE
ICODE
LIST
MAP
PRINTSYM
WARN
The PUSH and POP directives can be useful in auxiliary source input files that are 
referenced from other files by SOURCE directives. Within an auxiliary source file, you 
can save the state of certain compiler directives when you begin compiling statements 
from the file, and restore the state of those compiler directives when you complete 
reading from the auxiliary source file, without knowing what the surrounding context 
was.
Considerations
•
You can specify the PUSH directive on the FORTRAN command line, or anywhere 
in any source input file, provided that directive is permitted there. You can have 
any number of PUSH directives in a compilation.
•
The compiler maintains a push-down stack with a maximum of 16 elements for 
each directive that can be pushed and popped. If more than 16 elements are 
pushed into a directive stack, the oldest elements are lost. No message is given 
when an element is lost.
PUSH 
directive
directive  , directive[]. . .










