]>
We conclude our tour of Axiom with a brief discussion of system commands. System commands are special statements that start with a closing parenthesis ()). They are used to control or display your Axiom environment, start the HyperDoc system, issue operating system commands and leave Axiom. For example, )system is used to issue commands to the operating system from Axiom. Here is a brief description of some of these commands. For more information on specific commands, see Appendix A .
Perhaps the most important user command is the )clear all command that initializes your environment. Every section and subsection in this document has an invisible )clear all that is read prior to the examples given in the section. )clear all gives you a fresh, empty environment with no user variables defined and the step number reset to . The )clear command can also be used to selectively clear values and properties of system variables.
Another useful system command is )read. A preferred way to develop an application in Axiom is to put your interactive commands into a file, say my.input file. To get Axiom to read this file, you use the system command )read my.input. If you need to make changes to your approach or definitions, go into your favorite editor, change my.input, then )read my.input again.
Other system commands include: )history, to display previous input and/or output lines; )display, to display properties and values of workspace variables; and )what.
Issue )what to get a list of Axiom objects that contain a given substring in their name.
A useful system command is )undo. Sometimes while computing interactively with Axiom, you make a mistake and enter an incorrect definition or assignment. Or perhaps you need to try one of several alternative approaches, one after another, to find the best way to approach an application. For this, you will find the undo facility of Axiom helpful.
System command )undo n means ``undo back to step ''; it restores the values of user variables to those that existed immediately after input expression was evaluated. Similarly, )undo -n undoes changes caused by the last input expressions. Once you have done an )undo, you can continue on from there, or make a change and redo all your input expressions from the point of the )undo forward. The )undo is completely general: it changes the environment like any user expression. Thus you can )undo any previous undo.
Here is a sample dialogue between user and Axiom.
``Let me define two mutually dependent functions and piece-wise.''
``Here is the general term for .''
``And here is the general term for .''
``What is value of ?''
``Hmm, I think I want to define differently. Undo to the environment right after I defined .''
``Here is how I think I want to be defined instead.''
Redo the computation from expression forward.
``I want my old definition of after all. Undo the undo and restore the environment to that immediately after .''
``Check that the value of is restored.''
After you have gone off on several tangents, then backtracked to previous points in your conversation using )undo, you might want to save all the ``correct'' input commands you issued, disregarding those undone. The system command )history )write mynew.input writes a clean straight-line program onto the file mynew.input on your disk.