$PUSH – Save compiler options

Language reference ›› Directives ››
Parent Previous Next

This directive saves the current compiler options so that some of them may be modified locally, then restored with a $POP directive.

Several $PUSH may be nested (options are saved in a stack).

The saved options are: $ASSERTIONS, $BITMODE, $BOOLEVAL, $CODEGEN, $EXTENDED, $INTERRUPTS, $JUMPS, $WARNING, $HINTS (global and individuals), $OPTIMIZE, $SPACE, $STRICT.




procedure XYZ;
{$PUSH}
{$W OFF} // No warnings in this procedure
begin
 ...
end; // Here an automatic $POP is made, restoring previous options.