Contents Previous Next Subchapters

Setting Debugger Listing and Environment File
Syntax file name
file
fprint
See Also environment and active
Abbreviation fi
fp
Menu Command Debug | Set File . . .
Debug | Show File

Description
The file command, sets the current debugger listing file to the one specified by name. If name is not present, the listing file is set to the command line input. The fprint command, prints the name of the current debugger listing file.

Example
If the file temp.oms in the current working directory contains
     local x = 5
     function factorial(n) begin
          if n == 1 then return 1
          return factorial(n - 1) * n

     end
and at the DEBUG> prompt you enter
     file temp.oms
O-Matrix will set the Debugger listing file as temp.oms and print the following lines from the beginning of the file.
     1 local x = 5
     2 function factorial(n) begin
     3    if n == 1 then return 1
     4    return factorial(n - 1) * n
     5 end
(Note that the actual number of lines listed depends on the previous list command that set the number of listing lines.) Subsequent Debugger listing commands refer to the specified file. If you then request a listing of two lines starting at line four by entering
     list 4 2
O-Matrix will respond
     4    return factorial(n - 1) * n
     5 end

Active Variables
The file command also changes the file corresponding to active variables. This is useful for printing variables that are local to a file and not with in any function. If you continue the example above by entering
     quit
     clear
     include temp.oms
     stop
     active
The variable x will not be included in the active list. If you then enter
     file temp.oms
     active
The variable x will be included in the active list.