User`s manual

2-7
TROFF
Turns off the Trace function. See
TRON.
TRON
Turns on a Trace function that lets you follow program-flow for debugging
and execution analysis. Each time the program advances to a new program
line, that line number will be displayed inside a pair of brackets.
For example, enter the following program:
10 PRINT "START"
20 PRINT "GOING"
30 GOTO 20
40 PRINT "GONE"
Now type in TRON,
[ENTER]
, and RUN,
[ENTER]
.
<10> START
<20> GOING
<30> <20> GOING
<30> <20> GOING
etc.
(Press SHIFT and @ simultaneously to pause execution and freeze display.
Press any key to continue with execution.) As you can see from the display,
the program is in an infinite loop.
The numbers show you exactly what is going on. (To stop execution, hit
BREAK
key.)
To turn off the Trace function, enter TROFF. TRON and TROFF may be used
inside programs to help you tell when a given line is executed.
For example
50
TRON
60
X=X*3.14159
70
TROFF
might be helpful in pointing out every time line 60 is executed (assuming
execution doesn't jump directly to 60 and bypass 50). Each time these three
lines are executed, <60> <70> will be displayed. Without TRON, you wouldn't
know whether the program was actually executing line 60. After a program is
debugged, TRON and TROFF lines can be removed.