Introduced in the 1995 ANSI M[UMPS] language standard.
This variable indicates the current execution stack depth
(DO level).
The difference between $STACK and $ESTACK is
that $ESTACK may appear as an argument of the NEW
command. NEWing $ESTACK resets its value to 0
(zero), and can be useful to set up a layered error trapping
mechanism.
The value of $STACK is "absolute" since the start of the M[UMPS] process, whereas the value of $ESTACK is "relative" to the most recent "anchoring point".
SET $ETRAP="QUIT:$ESTACK GOTO LABEL^ROUTINE"
For more examples of the use of special variable $ESTACK, see the function $STACK.
This document is © Ed de Moel, 1995-2005.
It is part of a book by Ed de Moel that is published under the
title "M[UMPS] by Example" (ISBN 0-918118-42-5).
Printed copies of the book are no longer available.
This document describes the various special variables that are defined in the M[UMPS] language standard (ANSI X11.1, ISO 11756).
The information in this document is NOT authoritative
and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an
authoritative definition.
In this document, information is included that will
appear in
future standards.
The MDC cannot guarantee that these 'next'
standards will indeed appear.