TRACE n
(that is, a positive result) allows execution to continue, skipping the next n
pauses (when interactive debugging is or becomes active). TRACE -n
(that is, a negative result) allows execution to continue without pause and with tracing inhibited for n
clauses that would otherwise be traced. The trace action a TRACE instruction selects is saved and restored across subroutine calls. This means that if you are stepping through a program (for example, after using TRACE ?R
to trace results) and then enter a subroutine in which you have no interest, you can enter TRACE O
to turn off tracing. No further instructions in the subroutine are traced, but on return to the caller, tracing is restored.
TRACE ?R
instruction at its start. Having traced the routine, the original status of tracing is restored and, if tracing was off on entry to the subroutine, tracing and interactive debugging are turned off until the next entry to the subroutine.
Example 15.1. Character inout and output
Say expr /* displays the result of evaluating the */ /* expression */ name=expr /* alters the value of a variable */ Trace O /* (or Trace with no options) turns off */ /* interactive debugging and all tracing */ Trace ?A /* turns off interactive debugging but */ /* continues tracing all clauses */ exit /* terminates execution of the program */ do i=1 to 10; say stem.i; end /* displays ten elements of the array stem. */