322
SETTRACE Directive
Enable Program Tracing
Formats
1. Set Trace, Define File: SETTRACE [(chan)]
2. Trace File String: SETTRACE PRINT (string$)
3. Set Tracing of Windows Host Program: SETTRACE SERVER
Where
chan
Channel or logical file number of the file to which the trace output
will be written.
PRINT
Keyword indicating the trace of a file string.
SERVER
For internal use only.
string$
Character string to be displayed in the trace output. String expression.
This is treated as a remark if no SETTRACE or Trace Window is active.
Description
When you use the SETTRACE directive, ProvideX lists all statements as they are
executed until an ENDTRACE is encountered.
The END and STOP directives halt tracing. Tracing is suppressed during the
execution of a password-protected program.
When tracing, ProvideX lists the statements either to the terminal or to a file (if you
designate a channel in a SETTRACE directive). If you use a file, you have to open it
first and if it's a serial file, you have to lock it.
It can be confusing if an error occurs in the output/trace file, since the error will be
reported as an error for the current statement being traced, which itself may not be
in error.
See Also
Example
0010 I=3
0020 A=A*A
0030 I=I-1;
IF I<>0 THEN GOTO 0020
->SETTRACE
->run
0010 I=3
0020 A=A*A
0030 I=I-1;
IF I<>0 THEN GOTO 0020
0020 A=A*A
0030 I=I-1;
IF I<>0 THEN GOTO 0020
0020 A=A*A
0030 I=I-1;
IF I<>0 THEN GOTO 0020
->endtrace