11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Caché</strong> <strong>ObjectScript</strong> Special VariablesSee Also• <strong>Caché</strong> <strong>ObjectScript</strong>: SET command NEW command $USERNAME special variable• <strong>Caché</strong> SQL: CREATE ROLE DROP ROLE GRANT REVOKE %CHECKPRIV$STACKContains the number of context frames saved on the call stack.$STACK$STDescription$STACK contains the number for context frames currently saved on the call stack for yourprocess. You can also look at $STACK as the zero-based context level number of the currentlyexecuting context. Therefore, when a <strong>Caché</strong> job is started, before any contexts have beensaved on the call stack, the value of $STACK is zero (0).Each time a routine calls another routine with a DO command, the context of the currentlyexecuting routine is saved on the call stack and execution starts in the newly created contextof the called routine. The called routine can, in turn, call another routine and so on. Eachadditional call causes another saved context to be placed on the call stack.An XECUTE command and a user-defined function reference also establish a new executioncontext. A GOTO command does not.As new contexts are created by DO commands, XECUTE commands, or user-defined functionreferences, the value of $STACK is incremented. As contexts are exited with the QUITcommand, previous context are restored from the call stack and the value of $STACK isdecremented.This special variable cannot be modified using the SET command. Attempting to do so resultsin a error.$ESTACK is identical to $STACK, except that you can establish an $ESTACK level of 0(zero) at any point by issuing a NEW $ESTACK command. You cannot NEW the $STACKspecial variable.446 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!