INFO Procedure
Displays information on many aspects of the current PV‑WAVE session.
Usage
Input Parameters
expri—The expressions specifying the type of information to be displayed. These expressions are interpreted differently, depending on the keyword selected. If no keyword is selected, INFO displays basic information for its parameters.
Keywords
Breakpoints—Displays the breakpoint table containing the name of the program module, line number and source file name of each breakpoint. If Breakpoints is set to a specified variable, the information is stored in a string array of the variable name rather than displayed.
Calls—Displays the current procedure’s call stack containing the name of the program module, source file name, and line number. If Calls is set to a specified variable, the information is stored in a string array of the variable name rather than displayed. The first array element contains the information about the caller of the INFO command, the second element contains information about its caller, and so on.
-
If Level is specified with Calls, the information displayed is for the current routine on the level specified.
-
If Files is set to a specified variable, the names of all currently open files are stored in a string array of the variable name rather than displayed.
-
If Names is used, Files only displays information for the specified files.
-
If input parameters are supplied, Keys must be scalar strings containing the names of function keys, and information on the specified keys is displayed.
-
If no input parameters are supplied, information on all function keys is displayed.
-
If n ≥ 0, the level is counted from the $MAIN$ level to the current procedure.
-
If n < 0, the level count is relative, counting from the current procedure back to the $MAIN$ level.
-
* (asterisk)—Matches any string.
-
? (question mark)—Matches any character.
-
If Level is specified, only information about the procedure or function on the specified level is displayed.
-
If Names is used, only parameters with names matching those specified are displayed.
-
If Level is specified, only information about the procedures or functions on the specified level is displayed.
-
If Names is used, only the procedures and functions with names matching those specified are displayed.
-
If Level is specified, only information about the procedure or function on the specified level is displayed.
-
If Names is used, only variables with names matching those specified are displayed.
Note: Calls is useful for programs that require traceback information. |
Depth—Displays the depth of the current procedure’s call stack. If Depth is set to a specified variable, the depth of the procedure call stack is stored in a long scalar of the variable name rather than displayed.
Device—Lists all available graphics devices, and displays information about the currently selected graphics device. If Device is set to a specified variable, the list of all available graphics devices is stored in a string array of the variable name rather than displayed.
Files—Displays information about file units depending on the input parameters supplied in the calling sequence. If input parameters are supplied, the value for Files is taken to be integer file-unit numbers, and information on the specified units is displayed. If no input parameters are supplied, information about all open file units is displayed.
Full—If nonzero, displays all information about specified variable elements including structures, lists, and associative arrays.
Functions—Displays a list of all currently available user functions. If Functions is set to a specified variable, the function names are stored in a string array of the variable name rather than displayed.
Keys—Displays current function key definitions as set using the DEFINE_KEY procedure:
Level—Specifies the level of the program for which information is to be displayed. This keyword is used in conjunction with the keywords Calls, Parameters, Routines, Traceback, Upvar, and Variables.
Memory—Reports the amount of dynamic memory currently in use by the PV‑WAVE session, and the number of times dynamic memory has been allocated and deallocated. If Memory is set to a specified variable, it stores the information in a three-element long array of the variable name.
Names—Specifies patterns to be matched against strings which are to be displayed. This keyword is used in conjunction with other keywords. Patterns specified by Names can contain the following wild card characters.
Parameters—Displays the list of all parameters for the current procedure or function. The procedure or function must be specified as an input parameter for INFO, or Level must be used; otherwise, Parameters defaults to the $MAIN$ program level. If Parameters is set to a specified variable, the parameter names are stored in a string array of the variable name rather than displayed.
Procedures—Displays all procedures available in the current session. If Procedures is set to a specified variable, the procedure names are stored in a string array of the variable name rather than displayed. If Names is used, only procedures with names matching those specified are displayed.
Recall_Commands—Displays the currently saved commands. Input parameters are ignored.
Routines—Displays a list of all compiled procedures and functions with their parameter names. Keywords accepted by each module are enclosed in quotation marks. If Routines is set to a specified variable, the procedure and function names are stored in a string array of the variable name rather than displayed. The parameter names associated with the functions and procedures are not stored in the string array.
Structures—Displays information on the structure of variables depending on the input parameters specified in the calling sequence. If input parameters are supplied, the structure of those expressions is displayed. If no input parameters are supplied, all currently defined structures are shown.
Sysstruct—Displays information on all system structures (structures that begin with ‘!’). This keyword is a subset of the Structures keyword.
System_Variables—Displays information on all system variables. Input parameters are ignored. If System_Variables is set to a specified variable, the variable names are stored in a string array rather than displayed. If Names is used, only the system variables with names matching those specified are displayed.
Traceback—Displays the call stack of the current procedure, which contains the program module name, source file name, and the line number. If Traceback is set to a specified variable, the information is stored in a string array of the variable name rather than displayed. The first array element contains the information about the caller of the INFO command, the second element contains information about its caller, and so on. If Level is specified, only information about the procedure or function on the specified level is displayed.
Upvar—Displays the name of a variable from the previous program level that was passed as a parameter into the procedure or function that calls INFO. If Upvar is a string array, the name of the variable passed between the program levels is stored rather than displayed. If the variable doesn’t exist on the previous program level, an empty string is returned. Upvar can display the name of a variable on other program levels, if the Level keyword is also specified.
Userstruct—Displays information on the regular user-defined structures (structures that do not begin with ‘!’). This keyword is a subset of the Structures keyword.
Variables—Displays a list of all variables of the current function or procedure. The procedure or function must be specified either by using the input parameter of the INFO command, or by using Level; otherwise, Variables defaults to the $MAIN$ program level. If Variables is set to a specified variable, the procedure or function variable names are stored in a string array rather than displayed.
Discussion
Select information on a specific area by specifying the appropriate keyword from the above list.
If no input parameters or keywords are specified, INFO shows the current nesting of procedures and functions, all current variables at the current program level, and open files.
For more information, see the PV‑WAVE Programmer’s Guide.