Allows the user to trace program execution for debugging purposes.
trace new; trace new, mask;
new: (scalar) new value for trace flag. mask: (scalar) optional mask to allow leaving some bits of the trace flag unchanged.
trace 1+8; // trace fn/proc calls/returns to standard // output trace 2+8; // trace line numbers to standard output trace 1+2+8; // trace line numbers and fn/proc calls/ // returns to standard output trace 1+16; // trace fn/proc calls/returns to printer trace 2+16; // trace line numbers to printer trace 1+2+16; // trace line numbers and fn/proc calls/ // returns to printer
The trace command has no effect unless you are running your program under GAUSS’s source level debugger. Setting the trace flag will not generate any debugging output during normal execution of a program.
The argument is converted to a binary integer with the following meanings:
|twos||2||trace line numbers|
|eights||8||output to window|
|sixteens||16||output to print|
|thirty-twos||32||output to auxiliary output|
|sixty-fours||64||output to error log|
The trace output as a program executes will be as follows:
|(+GRAD)||calling function or procedure GRAD|
|(-GRAD)||returning from GRAD|
|||executing line 47|
Note that the line number trace will only produce output if the program was compiled with line number records.
To set a single bit use two arguments:
||turn on output to printer|
||turn off output to printer|