17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GW-BASIC <strong>User's</strong> Guide<br />

TRON/TROFF Commands<br />

Purpose:<br />

To trace the execution of program statements.<br />

Syntax:<br />

TRON<br />

TROFF<br />

Comments:<br />

As an aid in debugging, the TRON (trace on) command enables a trace flag that prints each line<br />

number of the program as it is executed. The numbers appear enclosed in square brackets.<br />

TRON may be executed in either the direct or indirect mode.<br />

The trace flag is disabled with the TROFF (trace off) command, or when a NEW command is<br />

executed.<br />

Examples:<br />

TRON<br />

10 K=10<br />

20 FOR J=1 TO 2<br />

30 L=K + 10<br />

40 PRINT J; K; L<br />

50 K=K+10<br />

60 NEXT<br />

70 END<br />

RUN<br />

[10][20][30][40] 1 10 20<br />

[50][60][30][40] 2 20 30<br />

[50][60][70]<br />

TROFF<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/TRON.html28/03/2004 21.29.51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!