PV-WAVE Foundation > Programmer Guide > Getting Session Information > Calling INFO with Keyword Parameters
Calling INFO with Keyword Parameters
This section describes how to call the INFO function with its associated keywords.
INFO, /Device
The command:
INFO, /Device
gives information about the current graphics device. This information depends on the abilities of the current device, but the name of the device is always given. Other parameters to INFO are ignored when Device is selected. As an example of the type of information supplied, the commands:
; Select PostScript output.
SET_PLOT, 'PS'
; Get device information.
INFO, /Device
yield:
Current graphics device: PS
File: <none>
Mode: Portrait, Non-Encapsulated
Offset (X, Y): (1.905,12.7) cm.
Size (X, Y): (17.78,12.7) cm.
Scale Factor: 1
Font Size: 12
Font: Helvetica
# bits per image pixel: 4
INFO, /Files
The Files keyword provides information about file units. If no parameters are supplied, information on all open file units is displayed. If parameters are provided, they are assumed to be integer file unit numbers, and information on the specified file units is given. For example, the command:
INFO, –2, –1, 0, /Files 
gives information about the default file units. For example, under UNIX, the output might look like this:
Unit                 Attributes                                                  Name
–2                    Write, Truncate, Tty, Reserved               <stderr>
–1                    Write, Truncate, Tty, Reserved               <stdout>
 0                      Read, Tty, Reserved                                 <stdin>
The attributes column tells about the characteristics of the file. For instance, the file connected to logical file unit –2 is called stderr, and is the standard error file. It is opened for write access (Write), is a new file (Truncate), is a terminal (Tty), and cannot be closed via the CLOSE command (Reserved).
INFO, /Keys
The Keys keyword provides current function key definitions, as set with the DEFINE_KEY procedure. For information on DEFINE_KEY, see the PV‑WAVE Reference.
If no parameters are supplied, information on all function keys is displayed. If parameters are provided, they must be scalar strings containing the names of function keys, and information on the specified keys is given.
For example, you can define the <F12> key to execute the command   INFO, /Keys with the statement:
DEFINE_KEY, /Terminate, 'F12', 'INFO, /Keys'
the INFO, /Keys command produces output that includes the line:
F12 <\033[P> = INFO, /Keys <Terminate>
showing the new key definition.
Parameters to INFO are ignored when Keys is selected.
INFO, /Memory
PV-WAVE uses dynamic (heap) memory to store items such as programs and variables. The Memory keyword reports the amount of dynamic memory in use by the PV-WAVE session, and the number of times dynamic memory has been allocated and deallocated. A typical response to the INFO, /Memory command might look like:
heap memory in use: 14572, calls to MALLOC: 64, FREE: 3 
Other parameters to INFO are ignored when Memory is selected.
INFO, /Recall_Commands
PV-WAVE saves the last 20 lines of input in a buffer. These lines can be recalled for command line editing. The Recall_Commands keyword causes the INFO procedure to display the contents of this buffer. Other parameters to INFO are ignored when Recall_Commands is selected.
 
note
For more information on reviewing and re-entering previously entered commands, see Getting Started: UNIX in the PV‑WAVE User’s Guide.
For more information on reviewing and re-entering previously entered commands, see Getting Started: Windows in the PV‑WAVE User’s Guide.
INFO, /Routines
The Routines keyword causes INFO to print a list of all compiled procedures and functions with their parameter names. Keyword parameters accepted by each module are enclosed in quotation marks. Other parameters to INFO are ignored when Routines is selected. For the typical session described earlier, the result of the command
INFO, /Routines
would appear as:
Saved Procedures: 
INTERP_COLORS       pts npts colors
READ_SRF            file image r g b
SHOW3                image "INTERP"
Saved Functions:
AVG                 array dimension
BILINEAR            p ix jy
CORRELATE           x y
CURVEFIT              x y w a sigmaa
INFO, /Structures
The Structures keyword provides information about structure variables. If no parameters are provided, all currently defined structures are shown. If parameters are provided, the structure of those variables are displayed. For example, the command
INFO, /Structures, !D
shows the contents and structure of the system variable !D:
** Structure !Device, 14 tags, 60 length:
NAME         STRING     'X'
X_SIZE       LONG       640
Y_SIZE       LONG       512
X_VSIZE      LONG       640
Y_VSIZE      LONG       512
X_CH_SIZE    LONG       6
Y_CH_SIZE    LONG       9
X_PX_CM      FLOAT      40.0000
Y_PX_CM      FLOAT      40.0000
N_COLORS     LONG       256
TABLE_SIZE   LONG       256
FILL_DIST    LONG       1
WINDOW       LONG      -1
UNIT         LONG       0
FLAGS        LONG       444
ORIGIN       LONG       Array(2)
ZOOM         LONG         Array(2)
note
It is often more convenient to use INFO, /Structures instead of PRINT to look at the contents of a structure variable because it shows the names of the fields as well as the data. For instance, the command:
PRINT, !D
gives the output:
{X  640   512   640   512   6   9   40.0000   40.0000   256   256  1   –1   0   444   0   0   1   1}
which is less readable.
See also the Sysstruct and Userstruct keywords described later.
 
INFO, /System_Variables
The System_Variables keyword causes INFO to show all system variables and their values. Other parameters to INFO are ignored when the System_Variables keyword is selected. The command:
INFO, /System_Variables
displays the current values of system variables.
INFO, /Sysstruct
The Sysstruct keyword displays only the system structures (structures that begin with “!”). The output of this command is a subset of the INFO, /Structures command described previously.
INFO, /Traceback
The Traceback keyword displays the current nesting of procedures and functions. Other parameters to INFO are ignored when Traceback is selected.
INFO, /Userstruct
The Userstruct keyword displays only the regular user-defined structures (structures that do not begin with “!”). The output of this command is a subset of the INFO, /Structures command described previously.