You can save variables and parameters. However, matrices and strings/functions are not currently supported.
The SAVE VARIABLE command is used to save the variables to a file. The RESTORE VARIABLE command can then be used to restore the variables and parameters in this file.
where <file-name> is the name of a file where the variables and parameters were previously saved.
If no <file-name> is given, the file "dpsavf.tex" is used.
No variable list is given as the variable and parameter names are contained in the file.
RESTORE VARIABLES VARLIST.DAT
Y VARIABLE 3 0.1800000E+02 0.3800000E+02 0.1500000E+02 AVAL PARAMETER 0.1000000E+01For each name, the first line prints the variable/parameter name and also prints the type (VARIABLE or PARAMETER). If the name is a variable, the next line specifies the number of elements in the variable. The contents of the variable are then printed one element per line. If the name is a parameter, then the value of the parameter is printed on the next line.
Variables and parameters are printed one at a time.
When the RESTORE VARIABLE command is given, Dataplot will go through the list of names. The name will be checked against the current Dataplot name table. If the name currently exists as a string or a function, the name will not be restored. If the name exists as a parameter or a variable, it will be overwritten by the values in the file. One complication is when the type in the current name table does not match the type in the save file. If the current name is being upgraded from a parameter to a variable, this should not cause any problems. However, if the current name is being modified from variable to a parameter, it is recommended that you delete the current variable before issuing the RESTORE VARIABLE command. If no match is found in the current name table, the variable or parameter will be added. Names that are in the current name table but not in the save file will not be changed. Note:
As a further caution for Unix hosts, certain expansion characters (specifically ~ to refer to your home directory) are interpreted by the shell and are not recognized by the Fortran compiler. These expansion characters are interpreted as literal characters and do not yield the intended file name.
SKIP 25 READ BERGER1.DAT Y X BATCH SAVE VARIABLES Y X BATCH . LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 100 LET X = SEQUENCE 1 1 10 LET BATCH = 1 FOR I = 1 1 10 . RESTORE VARIABLES PRINT Y X BATCH