DEFSYSV Procedure
Creates a new system variable initialized to the specified value.
Usage
DEFSYSV, name, value [, read_only]
Input Parameters
nameA scalar string containing the name of the system variable to be created. All system variables must begin with the ! character.
valueAn expression from which the type, structure, and initial value of the new system variable is taken. May be a scalar, array, or structure.
read_only(optional) If present and nonzero, causes the resulting system variable to be read-only. Otherwise, the value for name may be modified.
Keywords
None.
DIscussion
System variables can be defined at any program level (in functions and procedures, and at the main program level).
Example
This example uses procedure DEFSYSV to create read-only system variables to hold the constant e, which is the base of the natural logarithm, in both single-precision and double-precision forms.
; Create the single-precision system variable containing e.
DEFSYSV, '!e', 2.71828, 1
; Create the double-precision system variable containing e.
DEFSYSV, '!de', 2.718218D, 1
; Use the INFO procedure to display all system variables.
INFO, /System_Variables