Prism 6.0 User's Guide

Saving the Values of a Variable

You can save the values of a variable or expression to a file for later use.

From the Command Line

Use the command varsave to save the values of a variable or expression to a file. Its syntax is

varsave "filename" expression

where filename is the name of the file to which the data is to be saved, and expression is the variable or expression whose values are to be saved. For example,

varsave "alpha.data" alpha

saves the values of the variable alpha in the file alpha.data (in your current working directory within Prism).

varsave "/u/kathy/alpha2.data" alpha*2

saves the results of the expression alpha*2 in the file with the path name /u/kathy/alpha2.data.

From a Visualizer

Use the Save or Save As selection from a visualizer's File menu to save the visualizer's values to a file.

If you choose Save As, a dialog box appears in which you can specify the name of the file to which the values are to be saved; see Figure 5-15.

Figure 5-15 Saving a Visualizer's Data to a File

Graphic

The highlighted directory is the current working directory. If you want to put the file there, simply type its name in the Save As box and click on OK.

If you want to put the file in another directory, click on the directory. (The parent directories of the current working directory are shown above it in the Directories list; its subdirectories are listed beneath it.) This will display the subdirectories of the directory you clicked on. You can traverse the directory structure in this manner until you find the directory in which you want to put the file, or, you can simply type the entire path name in the Save As box.

Choose the Save selection to save the values in the file you most recently specified. If you haven't specified a file, the values are saved in a file called noname.var in your current working directory in Prism.