.LP The following is a complete list of \*a system commands. .IP ")clear" 14 This command is used to completely initialize an \*a workspace. Usually when \*a is started, it will print: ``clear ws''. This means that no internal variables or functions are defined. Sometimes, it is desirable to completely erase everything, and this command serves that purpose. To let you know that everything has been erased, \*a will output the message ``clear ws''. .IP ")code fn" 14 This command causes \*a to print the compiled internal code for the function ``fn''. This is intended for \*a system development and not for general use. .IP ")continue" 14 ``)continue'' is a combination of the ``)save'' and ``)off'' commands (see below). The internal workspace is saved in a file named ``continue'', and then \*a is terminated. Since \*a will by default look for the file ``continue'' in the current directory when it is next run, this provides a convenient method of suspending and resuming an \*a session. .IP ")copy xxx" 14 This command instructs \*a to locate the \*u file ``xxx'' and load it into its internal workspace, similar to the ``)load'' command (see below). The difference between ``)load'' and ``)copy'' is that ``)load'' will replace the current internal workspace with the one being read in, while ``)copy'' merges the current internal workspace with the one being read in. Functions and variables which are loaded from the file take precedence over functions and variables of the same name existing already in the internal workspace. .IP ")digits n" 14 This command is used to specify to \*a how many digits are to be displayed when a number is printed in floating-point or exponential format. By default, \*a will print 9 digits. You may specify any number between 1 and 19 for the number of digits (n). \*a will respond with the number of digits it was using. .IP ")debug" 14 This command invokes ``debug mode.'' In this mode, every action which \*a takes is logged on the terminal. This mode is excellent for generating reams of hopelessly cryptic output and exists only to facilitate \*a development. It is not intended for general use. Debug mode can be turned off by issuing the ``)debug'' system command a second time. .IP ")drop list" 14 This command performs the same function as ``rm'' in \*u. The names of the files to be deleted should be separated by spaces or tabs. The files may be \*a workspaces, ASCII files, or any other type of \*u file. .IP ")editf xxx" 14 This command is used to create and edit functions. If the function named ``xxx'' exists in the workspace, \*a will write it into a temporary \*u file and then will execute the \*u editor on that file. When you have finished editing the file, and you exit the editor, \*a will come back and will read the function from the temporary file. .IP ")edit xxx" 14 This command is similar to ``)editf'' except that ``xxx'' is a \*u filename. \*a will execute the editor to edit the \*u file named ``xxx'', and when the editing is complete, \*a will read that file into the workspace. The difference between ``)edit'' and ``)editf'' is that ``)editf'' essentially edits functions directly from the workspace, while ``)edit'' gets the functions from the \*u directory. .IP ")erase list" 14 This command is handy when it is desirable to get rid of parts of a workspace without using ``)clear'' to eliminate all of it. A list of function and variable names (separated by spaces or tabs) may be specified. The named functions and variables will be deleted from the internal workspace. The remainder of the workspace will not be affected. .IP ")fns" 14 This command causes \*a to list the names of all of the functions which are defined in its internal workspace. .IP ")lib" 14 This command is similar to the ``ls'' command in \*u. It causes \*a to list the names of all of the \*u files in the current directory. .IP ")list xxx" 14 This command causes \*a to print out the function named ``xxxx''. This is very handy for looking at a function without having to use the editor \(em especially when an error has occurred and you wish to look at a function without disturbing the state indicator. .IP ")load xxx" 14 This command is used to instruct \*a to load the \*u file ``xxx'' as a workspace. After the file is loaded, \*a's internal workspace will be the same as it was when the workspace file was saved with ``)save'', and that previous \*a session may be resumed. If the workspace file exists and is successfully loaded, \*a will print the time and date that the workspace was last saved. .IP ")off" 14 This command terminates the \*a session. The \*u command program will come back and print its prompt (``$ '' or ``% ''). .IP ")origin n" 14 This command is used to change the ``origin''. By default, the origin is 1. The ``origin'' is the starting index for arrays. For example, if the origin is 0, then the first element of a 3-element array A is A[0]. If the origin is 5, the first element will be A[5]. Although standard \*a permits only 0 or 1 for the origin, \*u \*a allows any integer value. \*a will answer with the origin it was using. .IP ")prws" 14 This command causes \*a to print the contents of the workspace in a readable format. Non-scalar variables are displayed along with their dimensions; functions are displayed as via the ``)list'' system command. .IP ")read xxx" 14 At times it is desirable to read a function which is stored in an ASCII file into the internal workspace. The ``)read'' command causes \*a to read the \*u file named ``xxx'' into the workspace as a function. Note that ``)read'' and ``)load'' (see above) are .I not the same thing. ``)load'' reads a complete new workspace into \*a from a workspace-format file, while ``)read'' reads a function from an ASCII file and adds it to the current workspace. .IP ")reset" 14 This command is used to reset the state indicator. All suspended functions are reset; the state indicator will be cleared. APL returns to the global level. .IP ")save xxx" 14 This command causes \*a to write its internal workspace into a \*u file. This allows the current session to be resumed at a later time. If the save is successful, \*a will output the date and time. .IP ")script xxx" 14 This command places \*a into a ``protocol'' mode. Following this command, \*a will copy all input from the terminal and output to the terminal to the file ``xxx''. Thus, ``xxx'' is a complete transcript of the \*a session. To turn off the script file, type ``)script off''. The protocol file which is produced will contain all of the output produced by \*a itself, but will, unfortunately, not contain any output produced by another process (such as the editor). .IP ")shell" 14 This command is useful when it is desired to return to \*u temporarily without having to save the current internal workspace, exit \*a, and later re-enter \*a and reload the workspace. ``)shell'' causes \*a to execute the \*u ``shell'' program (command interpreter). When you have finished with the shell, logout and you will be returned to \*a. .IP ")si" 14 This command is useful when something goes wrong. When an error occurs, the function that was executing is ``suspended''. The ``)si'' command causes \*a to print a traceback of the suspended functions. Each function is listed, in the reverse order that it was called. The current line number for each function is also printed. Functions followed by an asterisk (``*'') were suspended due to an error; these were called by functions listed on the following lines whose names are not followed by an asterisk. .IP ")trace" 14 This command turns on \*a's internal ``trace'' mode. When tracing is turned on, \*a will report the function name and line number of each line in every function executed. Thus, the flow of execution from the start to the end of a run can be followed. .IP ")untrace" 14 This command turns off ``trace'' mode. .IP ")vars" 14 This command causes \*a to list the names of all of the variables which are defined in its internal workspace. .IP ")vsave xxx" 14 This command allows parts of a workspace to be saved. The functions and variables which are specified will be saved in a \*u file in the same format as produced by ``)save'' (see above). \*a will prompt for the names of the functions and variables to be saved. When you have entered the last name, type a blank line to end the save operation. The workspace you have created with ``)vsave'' may be loaded with ``)load'' at some later time. ``)vsave'' does not affect variables in the internal workspace. .IP ")width n" 14 This command tells \*a to print n characters per line. This is useful to keep output from being printed outside of the physical terminal width. Lines longer than this length will be ``wrapped-around''. \*a will respond with the previous terminal width. .IP ")write xxx" 14 This command is the complement of ``)read'' (see above). It takes the function ``xxx'' from the current workspace and writes it to an ASCII file named ``xxx''. This is useful for writing functions which will be ``)read'' later into other workspaces. Note that ``)write'' and ``)vsave'' are not the same thing, for ``)write'' is used to write a function into an ASCII file while ``)vsave'' saves a selected subset of the internal workspace in a workspace-format file. .LP