Contents Previous Next Subchapters

Listing Variables Defined in The Current Environment
Syntax variables
See Also defined , active

Returns a character matrix containing a list of the variables that are defined in the current file and function; i.e., the variables that are currently in scope . Each row of the return value corresponds to one variable and is divided into six columns. The columns are separated by commas, thus the align function can be used to line the columns up. The first column contains the name of the variable. The second column contains the type of the variable. The third (fourth) column contains the number of rows (columns) in the corresponding matrix. The fifth (sixth) column contains the name of the function (file) that the variables scope is restricted to. If the fifth (sixth) column is just spaces, the variable is not restricted to a specific function (file).

If at the O> prompt you enter
     x = 1
     const y = 2 
     function f() begin
          global x
          z = 3
O-Matrix will respond
There is nothing listed in the sixth column because the scope of f is not restricted to a particular file. The function f is listed in the fifth column for x because the scope of the global statement is limited to the function. The name y does not appear because it corresponds to a constant.