Contents Previous Next Subchapters

Listing Active Variables in The Current Environment
Syntax active
See Also watch , env , dbprint , user
Abbreviation a
Menu Command Debug | Active

Lists the variables and constants that are accessible in the current environment. This command also lists the attributes of all the variables and constants that are visible in the current environment . The following table describes the attribute columns:
Name matrix name
Type matrix type
nr number of rows in the matrix
nc number of columns in the matrix
Function function that matrix is defined in
File file that restricts function or matrix scope
If at the O> prompt you enter
     u = 8
     function f() begin
          x = 1
          const y = 4
O-Matrix will activate the Debugger window. If you then enter
O-Matrix will respond
Name                 Type            nr    nc    Function, File
.                    .               .     .     .
.                    .               .     .     .
.                    .               .     .     .
x                    int             1     1     f, 
y                    int             1     1     f, 
where the vertical dots represent constants that are defined in autoexec.oms and are always visible. Note that u was not listed because it is not currently visible inside of the function f. In addition, there is nothing listed in the File column because the function f is not local to a particular file. (Note that the Function and File headings may not be visible unless you scroll the window to the right.)

If you continue this example by entering
     env 1
O-Matrix will list the variables that are visible outside of the function f, namely
Name                 Type            nr    nc    Function, File
.                    .               .     .     .
.                    .               .     .     .
.                    .               .     .     .
u                    int             1     1     , 
Note that in the case of the variable u both the Function and File columns are empty because u is not restricted in scope to a particular function or file.

Watch Points
If you wish to set a watch point on a particular variable, you will have to reference the same name, function, and file as listed by the active command.