Contents Previous Next Subchapters

Line By Line Tracing Of Execution
Syntax trace flag
See Also step , next , list
Abbreviation t
Menu Command Debug | Tracing . . .

The value of flag can be on, off, or a decimal number of seconds. If flag is on, O-Matrix will trace execution in the Debugger window. If flag is off, tracing is turned off. If flag is a decimal number, tracing is turned on and slowed so that the time in seconds between printing lines is equal to the decimal number. If file is specified, only statements in that particular file are traced.

If the file TEMP1.OMS in the current working directory contains
     function f(x) begin
          return x
and the file TEMP2.OMS in contains
     x = {1, 2, 3}
and at the O> prompt you enter
     include TEMP1.OMS
and then at the DEBUG> prompt enter
     trace on
and at the O> prompt you enter
     include TEMP2.OMS
O-Matrix will display the following in the Debugger window:
          1 x = {1, 2, 3}
          2 f(x)
          1 function f(x) begin
          2   return x

Note that O-Matrix prints the filename every time it changes. Also note that a blank line is printed when control returns to the command line.

If you continue this example by entering
     trace on TEMP2.OMS
at the DEBUG> prompt, followed by
     include TEMP2.OMS
at the O> prompt, O-Matrix will respond
          1 x = {1, 2, 3}
          2 f(x)
in the Debugger window. Note that none of the filenames are printed in this case because there is only one file being traced.