Previous Up Next

5.6.2  Reading files: read load

Information for Xcas can be stored in a file; this information can be read with the read or load command, depending on the type of information.


The read command reads a file containing Xcas information, such as a program that you saved (see Section 3.6.3) or simply commands that you typed into a file with a text editor. The file should have the suffix .cxx.


Example.
If you have a file named myfunction.cxx,
Input:

read("myfunction.cxx")

will read in the file, as long as the directory is in the current working directory. If the file is in a different directory, you can still read it by giving the path to the file,
Input:

read("/path/to/file/myfunction.cxx")


The load command reads in a saved session (see Section 3.6.1), which will end in .xws.


Example.
If you have a session saved in the file mysession.xws,
Input:

load("mysession.xws")

loads mysession.xws.


Previous Up Next