RESTORE

The RESTORE procedure restores the IDL variables and routines saved in a file by the SAVE procedure.

Note to VMS Users

When reading older VMS format files, IDL knows that all floating-point values are in VAX format. These floating values are automatically converted to IEEE format. Only VMS/IDL is able to restore the native VMS format.

Calling Sequence

RESTORE [, Filename]

Arguments

Filename

A scalar string that contains the name of the file from which the IDL objects should be restored. If not present, the file idlsave.dat is used.

Keywords

FILENAME

The name of the file from which the IDL objects should be restored. If not present, the file idlsave.dat is used. This keyword serves exactly the same purpose as the Filename argument--only one of them needs to be provided.

RELAXED_STRUCTURE_ASSIGNMENT

Normally, RESTORE is unable to restore a structure variable if the definition of its type has changed since the SAVE file was written. A common case where this occurs is when objects are saved and the class structure of the objects change before they are restored in another IDL session. In such cases, RESTORE issues an error, skips the structure, and continues restoring the remainder of the SAVE file.

Setting the RELAXED_STRUCTURE_ASSIGNMENT keyword causes RESTORE to restore such incompatible values using " relaxed structure assignment," in which all possible data are restored using a field-by-field copy. (See the description of the STRUCT_ASSIGN procedure for additional details.)

RESTORED_OBJECTS

Set this keyword equal to a named variable that will contain an array of object references for any objects restored. The resulting list of objects is useful for programmatically calling the objects' restore methods. If no objects are restored, the variable will contain a null object reference.

VERBOSE

Set this keyword to have IDL print an informative message for each restored object.

Example

Suppose that you have saved all the variables from a previous IDL session with the command:

SAVE, /VARIABLES, FILENAME = 'session1.sav'

The variables in the file session1.sav can be restored by entering:

RESTORE, 'session1.sav'

See Also

JOURNAL , SAVE , STRUCT_ASSIGN