When executing the function TRACE, the argument must be entered in single
quotes. For example:
:; 'r' 1:: v E: f: 2 3 14. 4
::; 'I'
Ef v E c 3 ::I 6
s 'r' I, v E: E: '4. ::I 8
:; 'i' 1:: v li. I:: 5 :3 2 0
'r'hs."E:VE:.. , ()
?3 7' E v 1:: 2
Each statement of function
STEVE has been traced.
2 0
Stop Control
Stop control is used to stop the execution of a function just before specified
statements. At each stop, the function name and statement number of the state-
ment to be executed next is displayed. The statements are specified by a stop
vector. The format of the stop control function is SA STEVEW, where STEVE
is the name of the function and I is the vector specifying the statements. After
the stop, the system is in the suspended state (see Chapter 7); execution is
resumed by entering +nLC (see Chapter 5). SASTEVE+tO (STEVE is the
function name) must be entered to discontinue the stop control function.
Stop control can be set by statements within a function. These statements
initiate halts when a variable contains a certain value. For example,
SA STEVE+4xN>8 means stop before statement 4 in function STEVE when
is greater than 8.
Trace control and stop control can both be used in the same user-defined
Chapter 7. Suspended Function Execution
The execution of a user-defined function can be
interrupted (suspended) in a var-
iety of ways: by an error message (see Chapter 11 ), by pressing ATTN (see
Chapter 11, or by using the stop control vector (see Chapter 6). In any case, the
suspended function is still considered active, since its execution can be resumed.
Whatever the reason for the suspension, when it occurs, the statement number of
the next statement to be executed is displayed. A branch to the statement num-
ber that was displayed or a branch to OLC (+OLC, see Chapter 5) causes normal
continuation of the function, and a branch out (+O) exits the function.
When a function is suspended, the 5100 will:
Continue to execute system commands except )SAVE, )COPY, and )PCOPY.
0 Resume execution of the function at statement n when +n is entered.
Reopen the definition of any function that is not pendent. A pendent func-
tion is a function that called the suspended function. If a function called a
function that called a suspended function (and so on), it is also pendent
(see State lndicator in this chapter).
Execute other functions or expressions.
Note: The display of output generated by previous statements might have been
interrupted when the suspension occurred. This would be caused by the delay
between execution of the statement and the display of the output.
The state indicator identifies which functions are suspended (*) and at what point
normal execution can be resumed. Entering )SI causes a display of the state indi-
cator. Such a display might have the following form:
s :I:
HC'7 n %
G I, 2 1
F:' I: 3 ::I
This display indicates that execution was halted just before statement 7 of func-
tion H, that the current use of function H
was invoked in statement 2 of function
G, and that the use of function G was invoked in statement 3 of F. The *
appearing to the right of H[7] indicates that function H
is suspended; the func-
tions G and F are said to be pendent.
Previous Page Next Page