I: 3. :I
E: 2 :I
I:: 3 7
C: 4. ::I
I:: $5 :I
r 4) ::I
1: '7 ::I
r: t:) ::I
Since the value of a local name disappears as soon as execution of the function
finishes, the only time you can use or display the value of a local name is while
the function to which it belongs is still executing, is suspended, or is pendent.
Note: If a name is local to a function that calls another function, the value of
that local name can also be used by the called function.
A name local to a function that has not completed execution or that is suspended
(see Chapter 7) will be inaccessible if the name is also local to a more recently
called function. Putting it another way, the value of a name that you can use or
display is always the most recent local value of the name. Of course, as execu-
tion of the more recently called functions is completed, the next earlier value of
each local variable will again be accessible. A name can therefore be said to have
one active referent or value, and possibly several latent referents or values. For
c I4.3
C: 5 :J
c 4) :I
c '7 ::I
c 13 3
The )SIV command causes the SIV list (state indicator with local variables and
local user-defined functions listing) to be displayed. The SIV list contains a com-
plete set of referents of a name.
Note: See System Functions in Chapter 5 for an example of a local user-defined
function using the OFX system function.
If the SIV list is scanned downward, the first occurrence of a variable name is its
active referent. If the name appears again, it is a latent referent. Global names
are not found in this list; they can be displayed with the )VARS command and
)FNS command.
In the following SIV display, variable P has referents as follows:
1 !j :I: v
G I:: '7 :I .)(. z x I
F'C 1.k 3 P ,I - Active referent of P is local to function F.
Q I- 3 :I 3(*C x 'I'
G I:: J :I z x :I:
RE-?::^ p First latent referent of P
is local to function R.
As the state indicator is cleared (see Chapter 71, latent referents become active.
Previous Page Next Page