The RESTORE procedure restores the IDL variables and routines saved in a file by the SAVE procedure.
CAUTION:
While files containing IDL variables can be restored by any version of IDL that supports the data types of the variables (in particular, by any version of IDL later than the version that created the SAVE file), files containing IDL routines can only be restored by versions of IDL that share the same internal code representation. Since the internal code representation changes regularly, you should always archive the IDL language source files (
.pro
files) for routines you are placing in IDL SAVE files so you can recompile the code when a new version of IDL is released.
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.
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.
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.)
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.
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:
JOURNAL , SAVE , STRUCT_ASSIGN