Contents Previous Next Subchapters

Setting The Current Debugger Environment
Syntax env index
See Also env
Abbreviation e
Menu Command Debug | Set Environment . . .

Description
Sets the current environment and listing file within the debugger.

Example
If the file TEMP.OMS in the current working directory contains
     clear
     function f(x) begin
          stop
     end
     function g(x) begin
          f(2 * x)
     end
and you enter
     include TEMP.OMS
     g(1)
O-Matrix will activate the debugger window. If you then enter
     env
O-Matrix will respond
     Currently Executing Environments
     index function              line file
         1                         16
         2 g                        6 C:\OMWIN\TEMP.OMS
         3 f                        3 C:\OMWIN\TEMP.OMS

     Current Debugger Environment Settings
     index function                   file
         3 f                          C:\OMWIN\TEMP.OMS
If you enter
     env 2
O-Matrix will list the file TEMP.OMS with an arrow pointing to the currently executing line in the second environment. If you continue by entering
     env
O-Matrix will respond
     Currently Executing Environments
     index function              line file
         1                         16
         2 g                        6 C:\OMWIN\TEMP.OMS
         3 f                        3 C:\OMWIN\TEMP.OMS

     Current Debugger Environment Settings
     index function                   file
         2 g                          C:\OMWIN\TEMP.OMS
If you then enter
     print x
O-Matrix will respond
     1
because that is the value of x inside of the function g. If you enter
     env 3
O-Matrix will list the file TEMP.OMS with an arrow pointing to the currently executing line in the third environment. If you continue by entering
     print x
O-Matrix will respond
     2
because that is the value of x inside of the function f.