Inspect Manual
Inspect Concepts
Inspect Manual—429164-006
2-14
Activation of Scope Units
executed back to the main scope unit in the program. If a scope unit does not appear
in the call history, it is called an inactive scope unit.
Recursive Activation
Recursion occurs when a scope unit calls itself or another active scope unit.
Recursion causes two or more activations, or instances, of a single scope unit to
appear in the call history. Because each such instance has its own local variables, a
data reference to one of these variables is ambiguous.
To specify the particular activation to which a local data reference refers, you add an
instance number to the end of the scope path. If you do not specify an instance
number, Inspect assumes that the reference is to the most recent activation of the
variable's parent scope unit. When you give an instance number (for example,
1,2,3,…), you can specify it relative to the most recent activation or the earliest
activation, where 1 is the first, 2 is the second, and so on:
To examine an element as it exists during a particular instance, include an instance
number when you specify the scope path. You can count from either direction using
these conventions:
Instance 1 is the least recent instance—that is, the oldest chronologically. Positive
values count from the base of the stack toward the top.
Instance 0 is the most recent instance—that is, the current scope path.
Instance -1 is the next most recent—that is, the youngest chronologically.
Negative values count from the top of the stack toward the base.
A scope instance is either a relative instance or an absolute instance. Both are useful;
a user can easily specify the first occurrence of a scope of the last occurrence without
Note. Inspect permits a limited set of operations for inactive scope units. In an inactive scope
unit, you can:
Set or clear breakpoints.
Display the attributes of an identifier.
Display object code and source text (but not data values).
Zero (0) Specifies the most recent activation.
Negative
(-1,-2,-3,…)
Specifies the instance relative to the most recent activation: -1 is
the second-most recent, -2 is the third-most recent, and so on.
Positive
(1,2,3,…)
Specifies the instance relative to the first activation: 1 is the first,
2 is the second, and so on.