Tandy 1000 Basic Reference Manual page 334

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 10
I
BASIC Keywords
TROFF, TRON
Statements
TROFF
TRON
Turn the trace function on/off.
TRON turns on the tracer and TROFF turns it off.
The tracer lets you follow program flow. This is helpful for de-
bugging and for analyzing the execution of a program. After a
program is debugged, you can remove the TRON and TROFF
statements
.
Each time the program advances
to
a new line, the tracer dis-
plays that line number inside a pair of brackets.
Sample Program
2 2 9 0 TRON
2 3 0 0 X
=
X
*
3 . 1 4 1 5 9
2 3 1 0 TROFF
Lines 2290 and 2310 assure you that Line 2300 is actually
being executed, because [23001 is printed on the display each
time it is executed.
5 TRON
1 0 K = 1 0
2 0 FOR J = l TO 2
3 0 L = K + 1 0
4 0 P R I N T J ; K ; L
5 0 K = K + 1 0
6 0 N E X T J
7 0 TROFF
8 0 END
When you run this program,
BASIC
prints:
[ 1 0 1 [ 2 0 1 [ 3 0 1 ~ 4 0 1 1 1 0 2 0
~ 5 0 1 ~ 6 0 1 [ 3 0 1 [ 4 0 1 2 2 0 3 0
[ 5 0 1 [ 6 0 1 [ 7 0 1
332

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents