$ZQuit

$ZQUIT indicates whether the functionality associated with the gtm_zquit_anyway environment variable is enabled. If the environment variable gtm_zquit_anyway is defined and evaluates to 1 or any case-independent string or leading substrings of "TRUE" or "YES", GT.M sets $ZQUIT to 1 and executes code of the form QUIT <expr< as if it were SET <tmp>=<expr> QUIT:$QUIT tmp QUIT, where <tmp> is a temporary local variable in the GT.M runtime system that is not visible to the application code. The value of $ZQUIT is a compile time setting, that is it can be set during run-time but it has no effect on the behavior existing object code - it only effects code generated by auto-ZLINK or the ZCOMPILE command. This setting has no effect on late bound code such as that in XECUTE arguments, $ETRAP, $ZTRAP device EXCEPTIONS.

If gtm_zquit_anyway is not defined or evaluates to 0 or any case-independent string or leading substrings of "FALSE" or "NO", GT.M set $ZQUIT to 0 executes QUIT <expr> as specified by the standard. This feature is helpful when you want to run a block of code both as a routine and as an extrinsic function. Consider the following example:

GTM>zprint ^rtnasfunc
rtnasfunc(expr1)
  write "Hello ",expr1,!
  quit

When the gtm_zquit_anyway functionality is diabled, extrinsic function invocations return an error as per the standard.

GTM>write $zquit
0
GTM>write $$^rtnasfunc("jdoe")
Hello jdoe
  %GTM-E-QUITARGREQD, Quit from an extrinsic must have an argument

However, if you enable the gtm_zquit_anyway feature, extrinsic function invocations do not return an error.

GTM>write $zquit
1
GTM>write $$^rtnasfunc("jdoe")
Hello jdoe
GTM>