The system variable named ENTERLEVEL is a two-digit numeric
variable whose value equals the relative subprogram level of the
program currently executing.
For example, a value of 5 means than 5 ENTER operations were
executed to run the current program (i.e., the current program is
5 subprogram levels deep).
- If ENTERLEVEL equals zero, the current program is not a
subprogram (i.e., it was RUN, not ENTERed).
- Values greater than zero equal the number of ENTER operations
used to execute the current program.
See ENTER and EXIT
for more information on subprograms.
When a program is ENTER'd the system variable
RUNSTATE is set to 6.