Previous Up Next

5.4.6  Storing and recalling variables and their values: archive unarchive

The archive command stores the values of variables for later use in a file of your choosing.

For example, if the variable a has the value 2 and the variable bee has the value "letter" (a string), then entering

archive("foo",[a,bee])

will create a file named “foo” which contains the values 2 and "letter" in a format meant to be efficiently read by Xcas.

The unarchive command will read the values from a file created with archive.


Example.
With the file “foo” as above:
Input:

unarchive("foo")

Output:


2,"letter"

If you want to reassign these values to a and bee, you can enter

[a,bee]:= unarchive("foo")

Previous Up Next