336 TRACE Purpose TRACE makes the computer print out the line number of each line of the program before execution. There are three forms of TRACE : TRACE ON Causes the computer to print line numbers. TRACE OFF Turns off the trace facility. TRACE 6780 Would cause the computer to report only line numbers below 6780. With well-structured programs which have subroutines at high line numbers this will enable the user to trace through the structure of the program without being bothered with line numbers in procedures, functions and subroutines. Note that the interpreter does not execute line numbers very often.
10 FOR Z=0 TO 100 20 Q=Q*Z:NEXT Z 30 END would print [10] [20] [30] but 10 FOR Z=0 TO 100 20 Q=Q*Z 25 NEXT Z 30 END would print [10] [20] [25] [25] [25] [25] [25] etc. (Of course in MODE 7 the [ appears as 8 and ] appears as : .) TRACE is also turned off after an error, or by pressing ESCAPE or BREAK . Examples TRACE ON TRACE OFF TRACE X TRACE 3000