Saving Variables

Home, Up: Variables and User-Defined Constants

 

On this page:

The SAVE Command, The Saved Variables File Format, Retrieving Variables.

 

The SAVE Command

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.

You can add a comment line to the file by writing its text after the file name:

Save filename Comment ...

In case that you have set angle unit to degrees (default is radians) the line USE DEG will be included in the file, since some values might be angles.

 

SAVE is followed by a file name, everything that follows it is a comment -- you cannot specify which variable(s) will be saved.

 

The Saved Variables File Format

The file has one line for each variable, in the form of

$variable = value

The variable's values are saved with 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 with the command EDIT filename.

In the editor you can change the values of variables, or can delete variables you do not want to keep -- you can also add new ones.

Any changes you make will only become effective when you let Hypatia retrieve the variables from the file.

 

Retrieving Variables

Actually a saved variables file 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

 

This belongs to the chapter "Scripts", but we'll mention it here:

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, of course, always list your variables with the command SHOW (see previous page "Setting Variables").

 

Home, Up: Variables and User-Defined Constants, Prev: Setting Variables, Next: User-Defined Constants