Home, Up: Variables and User-Defined Constants
On this page:
The SAVE Command, The Saved Variables File Format, Retrieving Variables.
You can save the current variables to a file, from which you can later retrieve them.
Like all of Hypatia's files it will be located in Hypatia's program folder.
The file name must not contain spaces. It can include a file extension, but none is assumed if you do not make it part of the file name.
You can, of course, use as many files with saved variables as you want.
The pseudo variables $ and $$ (the previous and penultimate results) will not be saved.
? SAVE filename
saves the current variables to a file with the specified name.
In case that you have set the angle unit to degrees (default is radians) the line USE DEG will be included in the file, since some values might be angles.
You can add a comment line to the file by writing its text after the file name (without the hash sign #):
? SAVE filename Comment ...
(The comment will be converted to lower case, the first character will be upper case.)
SAVE is followed by a file name, everything that comes afterwards is a comment -- you cannot specify which variable(s) will be saved.
The file has one line for each variable, in the form of
$variable = value
The variables' values are saved with up to 18 digits, independent of the currently chosen output format.
To view or to edit the file you can open it in any text editor, for instance from within Hypatia with the command EDIT filename.
In the editor you can change the values of variables, you can delete variables you do not want to keep, and you can also add new ones -- you could even use the editor to create a file with variables from scratch.
Any changes you make will become effective when you let Hypatia retrieve the variables from the file.
Actually a file with saved variables is a script file -- see chapter Scripts -- but you do not need to know about scripts to retrieve your saved variables.
To do it is simple: you enter the file name preceded by an underscore character, with no space between them:
? _filename
If you give the command ECHO ON at any time before you retrieve your variables, then they will be listed as the file gets read.
You can always list your variables with the command SHOW (see previous page).
Home, Up: Variables and User-Defined Constants, Prev: Using Variables, Next: User-Defined Constants