13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

THON and THOFF commandsFunctionSyntaxRemarksDifferencesTRON and TROFF tum on and off execution trace.TRON (trace on)TROFF (trace off)TRONputs your program into a debugging mode in which. sourceline numbers, statement labels, and procedure and function namesare sent to the Trace window as each statement is executed; TROFFturns this debugging mode off.When running in text mode under <strong>Turbo</strong> <strong>Basic</strong>, the trace linenumbers, labels, and procedure and function names are sent to theTrace window.While tracing, press Alt-F9 to alternate between tracing and executing.Use Alt-F 10 to single-step to the next line number, label, orprocedure or function name.Unlike Interpretive BASIC, in <strong>Turbo</strong> <strong>Basic</strong> the physical position ofTRON and TROFF in your source program controls their effectrather than their position in the run-time execution path. For example,consider this program:10 GOTO 3020 TRON30 x = y + z40 TROFF50 ENDWhen executing this program,. Interpretive BASIC will nevertum on the trace, because as far as it's concerned the TRON statementin line 20 doesn't exist. <strong>Turbo</strong>,<strong>Basic</strong>, on the other hand, makestrace/no trace decisions at compile time and considers all statementsafter the appearance ofTRON as being turned on for tracing. There-:­fore, a <strong>Turbo</strong> <strong>Basic</strong>-produced program will output:[30] [40]when the preceding program runs.<strong>Turbo</strong> <strong>Basic</strong> Reference Directory 363

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

Saved successfully!

Ooh no, something went wrong!