1% Copyright The Numerical Algorithms Group Limited 1992-94. All rights reserved.
2% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk.
3
4%
5%
6%
7%
8%
9
10%
11\newcommand{\ugSysCmdTitle}{\Language{} System Commands}
12\newcommand{\ugSysCmdNumber}{B.}
13%
14% =====================================================================
15\begin{page}{ugSysCmdPage}{B. \Language{} System Commands}
16% =====================================================================
17\beginscroll
18
19This chapter describes system commands, the command-line
20facilities used to control the \Language{} environment.
21The first section is an introduction and discusses the common
22syntax of the commands available.
23
24\table{
25  { \downlink{\menuitemstyle{A.1. Introduction}}{ugSysCmdOverviewPage} }
26  { \downlink{\menuitemstyle{A.2. )abbreviation}}{ugSysCmdabbreviationPage} }
27  { \downlink{\menuitemstyle{A.3. )boot}}{ugSysCmdbootPage} }
28  { \downlink{\menuitemstyle{A.4. )cd}}{ugSysCmdcdPage} }
29  { \downlink{\menuitemstyle{A.5. )close}}{ugSysCmdclosePage} }
30  { \downlink{\menuitemstyle{A.6. )clear}}{ugSysCmdclearPage} }
31  { \downlink{\menuitemstyle{A.7. )compile}}{ugSysCmdcompilePage} }
32  { \downlink{\menuitemstyle{A.8. )display}}{ugSysCmddisplayPage} }
33  { \downlink{\menuitemstyle{A.9. )edit}}{ugSysCmdeditPage} }
34  { \downlink{\menuitemstyle{A.10. )fin}}{ugSysCmdfinPage} }
35  { \downlink{\menuitemstyle{A.11. )frame}}{ugSysCmdframePage} }
36  { \downlink{\menuitemstyle{A.12. )help}}{ugSysCmdhelpPage} }
37  { \downlink{\menuitemstyle{A.13. )history}}{ugSysCmdhistoryPage} }
38  { \downlink{\menuitemstyle{A.14. )library}}{ugSysCmdlibraryPage} }
39  { \downlink{\menuitemstyle{A.15. )lisp}}{ugSysCmdlispPage} }
40  { \downlink{\menuitemstyle{A.16. )load}}{ugSysCmdloadPage} }
41  { \downlink{\menuitemstyle{A.17. )ltrace}}{ugSysCmdltracePage} }
42  { \downlink{\menuitemstyle{A.18. )pquit}}{ugSysCmdpquitPage} }
43  { \downlink{\menuitemstyle{A.19. )quit}}{ugSysCmdquitPage} }
44  { \downlink{\menuitemstyle{A.20. )read}}{ugSysCmdreadPage} }
45  { \downlink{\menuitemstyle{A.21. )set}}{ugSysCmdsetPage} }
46  { \downlink{\menuitemstyle{A.22. )show}}{ugSysCmdshowPage} }
47  { \downlink{\menuitemstyle{A.23. )spool}}{ugSysCmdspoolPage} }
48  { \downlink{\menuitemstyle{A.24. )synonym}}{ugSysCmdsynonymPage} }
49  { \downlink{\menuitemstyle{A.25. )system}}{ugSysCmdsystemPage} }
50  { \downlink{\menuitemstyle{A.26. )trace}}{ugSysCmdtracePage} }
51  { \downlink{\menuitemstyle{A.27. )undo}}{ugSysCmdundoPage} }
52  { \downlink{\menuitemstyle{A.28. )what}}{ugSysCmdwhatPage} }
53}
54\endscroll
55\autobuttons
56\end{page}
57%
58%
59\newcommand{\ugSysCmdOverviewTitle}{Introduction}
60\newcommand{\ugSysCmdOverviewNumber}{B.1.}
61%
62% =====================================================================
63\begin{page}{ugSysCmdOverviewPage}{B.1. Introduction}
64% =====================================================================
65\beginscroll
66
67System commands are used to perform \Language{} environment
68management.
69Among the commands are those that display what has been defined or
70computed, set up multiple logical \Language{} environments
71(frames), clear definitions, read files of expressions and
72commands, show what functions are available, and terminate
73\Language{}.
74
75Some commands are restricted: the commands
76%-% \HDsyscmdindex{set userlevel interpreter}{ugSysCmdOverviewPage}{B.1.}{Introduction}
77%-% \HDsyscmdindex{set userlevel compiler}{ugSysCmdOverviewPage}{B.1.}{Introduction}
78%-% \HDsyscmdindex{set userlevel development}{ugSysCmdOverviewPage}{B.1.}{Introduction}
79\begin{verbatim}
80)set userlevel interpreter
81)set userlevel compiler
82)set userlevel development
83\end{verbatim}
84set the user-access level to the three possible choices.
85All commands are available at {\tt development} level and the fewest
86are available at {\tt interpreter} level.
87The default user-level is {\tt interpreter}.
88%-% \HDindex{user-level}{ugSysCmdOverviewPage}{B.1.}{Introduction}
89In addition to the \spadsys{)set} command (discussed in \downlink{``\ugSysCmdsetTitle''}{ugSysCmdsetPage} in Section \ugSysCmdsetNumber\ignore{ugSysCmdset})
90you can use the \HyperName{} settings facility to change the {\it user-level.}
91Click on \lispmemolink{Settings}{(|htSystemVariables|)} to immediately go to the settings facility.
92
93Each command listing begins with one or more syntax pattern descriptions
94plus examples of related commands.
95The syntax descriptions are intended to be easy to read and do not
96necessarily represent the most compact way of specifying all
97possible arguments and options; the descriptions may occasionally
98be redundant.
99
100All system commands begin with a right parenthesis which should be in
101the first available column of the input line (that is, immediately
102after the input prompt, if any).
103System commands may be issued directly to \Language{} or be
104included in {\bf .input} files.
105%-% \HDindex{file!input}{ugSysCmdOverviewPage}{B.1.}{Introduction}
106
107A system command {\it argument} is a word that directly
108follows the command name and is not followed or preceded by a
109right parenthesis.
110A system command {\it option} follows the system command and
111is directly preceded by a right parenthesis.
112Options may have arguments: they directly follow the option.
113This example may make it easier to remember what is an option and
114what is an argument:
115
116\centerline{{{\tt )syscmd {\it arg1 arg2} )opt1 {\it opt1arg1 opt1arg2} )opt2 {\it opt2arg1} ...}}}
117
118In the system command descriptions, optional arguments and options are
119enclosed in brackets (``\lanb'' and ``\ranb'').
120If an argument or option name is in italics, it is
121meant to be a variable and must have some actual value substituted
122for it when the system command call is made.
123For example, the syntax pattern description
124
125\noindent
126{\tt )read} {\it fileName} {\tt \lanb{})quietly\ranb{}}
127
128\noindent
129would imply that you must provide an actual file name for
130{\it fileName} but need not use the {\tt )quietly} option.
131Thus
132\begin{verbatim}
133)read matrix.input
134\end{verbatim}
135is a valid instance of the above pattern.
136
137System command names and options may be abbreviated and may be in
138upper or lower case.
139The case of actual arguments may be significant, depending on the
140particular situation (such as in file names).
141System command names and options may be abbreviated to the minimum
142number of starting letters so that the name or option is unique.
143Thus
144\begin{verbatim}
145)s Integer
146\end{verbatim}
147is not a valid abbreviation for the {\tt )set} command,
148because both {\tt )set} and {\tt )show}
149begin with the letter ``s''.
150Typically, two or three letters are sufficient for disambiguating names.
151In our descriptions of the commands, we have used no abbreviations for
152either command names or options.
153
154In some syntax descriptions we use a vertical line ``{\tt |}''
155to indicate that you must specify one of the listed choices.
156For example, in
157\begin{verbatim}
158)set output fortran on | off
159\end{verbatim}
160only {\tt on} and {\tt off} are acceptable words for following
161{\tt boot}.
162We also sometimes use ``...'' to indicate that additional arguments
163or options of the listed form are allowed.
164Finally, in the syntax descriptions we may also list the syntax of
165related commands.
166
167\endscroll
168\autobuttons
169\end{page}
170%
171%
172\newcommand{\ugSysCmdabbreviationTitle}{)abbreviation}
173\newcommand{\ugSysCmdabbreviationNumber}{B.2.}
174%
175% =====================================================================
176\begin{page}{ugSysCmdabbreviationPage}{B.2. )abbreviation}
177% =====================================================================
178\beginscroll
179%-% \HDsyscmdindex{abbreviation}{ugSysCmdabbreviationPage}{B.2.}{)abbreviation}
180
181
182\par\noindent{\bf User Level Required:} compiler
183
184\par\noindent{\bf Command Syntax:}
185\begin{items}
186\item {\tt )abbreviation query  \lanb{}{\it nameOrAbbrev}\ranb{}}
187\item {\tt )abbreviation category  {\it abbrev  fullname} \lanb{})quiet\ranb{}}
188\item {\tt )abbreviation domain  {\it abbrev  fullname}   \lanb{})quiet\ranb{}}
189\item {\tt )abbreviation package  {\it abbrev  fullname}  \lanb{})quiet\ranb{}}
190\item {\tt )abbreviation remove  {\it nameOrAbbrev}}
191\end{items}
192
193\par\noindent{\bf Command Description:}
194
195This command is used to query, set and remove abbreviations for category,
196domain and package constructors.
197Every constructor must have a unique abbreviation.
198This abbreviation is part of the name of the subdirectory
199under which the components of the compiled constructor are
200stored.
201%% BEGIN OBSOLETE
202%% END OBSOLETE
203Furthermore, by issuing this command you
204let the system know what file to load automatically if you use a new
205constructor.
206Abbreviations must start with a letter and then be followed by
207up to seven letters or digits.
208Any letters appearing in the abbreviation must be in uppercase.
209
210When used with the {\tt query} argument,
211%-% \HDsyscmdindex{abbreviation query}{ugSysCmdabbreviationPage}{B.2.}{)abbreviation}
212this command may be used to list the name
213associated with a  particular abbreviation or the  abbreviation for a
214constructor.
215If no abbreviation or name is given, the names and corresponding
216abbreviations for {\it all} constructors are listed.
217
218The following shows the abbreviation for the constructor \spadtype{List}:
219\begin{verbatim}
220)abbreviation query List
221\end{verbatim}
222The following shows the constructor name corresponding to the
223abbreviation \spadtype{NNI}:
224\begin{verbatim}
225)abbreviation query NNI
226\end{verbatim}
227The following lists all constructor names and their abbreviations.
228\begin{verbatim}
229)abbreviation query
230\end{verbatim}
231
232To add an abbreviation for a constructor, use this command with
233{\tt category}, {\tt domain} or {\tt package}.
234%-% \HDsyscmdindex{abbreviation package}{ugSysCmdabbreviationPage}{B.2.}{)abbreviation}
235%-% \HDsyscmdindex{abbreviation domain}{ugSysCmdabbreviationPage}{B.2.}{)abbreviation}
236%-% \HDsyscmdindex{abbreviation category}{ugSysCmdabbreviationPage}{B.2.}{)abbreviation}
237The following add abbreviations to the system for a
238category, domain and package, respectively:
239\begin{verbatim}
240)abbreviation domain   SET Set
241)abbreviation category COMPCAT  ComplexCategory
242)abbreviation package  LIST2MAP ListToMap
243\end{verbatim}
244If the {\tt )quiet} option is used,
245no output is displayed from this command.
246You would normally only define an abbreviation in a library source file.
247If this command is issued for a constructor that has already been loaded, the
248constructor will be reloaded next time it is referenced.  In particular, you
249can use this command to force the automatic reloading of constructors.
250
251To remove an abbreviation, the {\tt remove} argument is used.
252%-% \HDsyscmdindex{abbreviation remove}{ugSysCmdabbreviationPage}{B.2.}{)abbreviation}
253This is usually
254only used to correct a previous command that set an abbreviation for a
255constructor name.
256If, in fact, the abbreviation does exist, you are prompted
257for confirmation of the removal request.
258Either of the following commands
259will remove the abbreviation \spadtype{VECTOR2} and the
260constructor name \spadtype{VectorFunctions2} from the system:
261\begin{verbatim}
262)abbreviation remove VECTOR2
263)abbreviation remove VectorFunctions2
264\end{verbatim}
265
266\par\noindent{\bf Also See:}
267\downlink{``\ugSysCmdcompileTitle''}{ugSysCmdcompilePage} in section \ugSysCmdcompileNumber
268
269
270\endscroll
271\autobuttons
272\end{page}
273%
274%
275\newcommand{\ugSysCmdbootTitle}{)boot}
276\newcommand{\ugSysCmdbootNumber}{B.3.}
277%
278% =====================================================================
279\begin{page}{ugSysCmdbootPage}{B.3. )boot}
280% =====================================================================
281\beginscroll
282%-% \HDsyscmdindex{boot}{ugSysCmdbootPage}{B.3.}{)boot}
283
284
285\par\noindent{\bf User Level Required:} development
286
287\par\noindent{\bf Command Syntax:}
288\begin{items}
289\item {\tt )boot} {\it bootExpression}
290\end{items}
291
292\par\noindent{\bf Command Description:}
293
294This command is used by \Language{} system developers to execute
295expressions written in the BOOT language.
296For example,
297\begin{verbatim}
298)boot times3(x) == 3*x
299\end{verbatim}
300creates and compiles the \Lisp{} function ``times3''
301obtained by translating the BOOT code.
302
303\par\noindent{\bf Also See:}
304\downlink{``\ugSysCmdfinTitle''}{ugSysCmdfinPage} in section \ugSysCmdfinNumber
305\downlink{``\ugSysCmdlispTitle''}{ugSysCmdlispPage} in section \ugSysCmdlispNumber
306\downlink{``\ugSysCmdsetTitle''}{ugSysCmdsetPage} in section \ugSysCmdsetNumber
307\downlink{``\ugSysCmdsystemTitle''}{ugSysCmdsystemPage} in section \ugSysCmdsystemNumber
308
309
310\endscroll
311\autobuttons
312\end{page}
313%
314%
315\newcommand{\ugSysCmdcdTitle}{)cd}
316\newcommand{\ugSysCmdcdNumber}{B.4.}
317%
318% =====================================================================
319\begin{page}{ugSysCmdcdPage}{B.4. )cd}
320% =====================================================================
321\beginscroll
322%-% \HDsyscmdindex{cd}{ugSysCmdcdPage}{B.4.}{)cd}
323
324
325\par\noindent{\bf User Level Required:} interpreter
326
327\par\noindent{\bf Command Syntax:}
328\begin{items}
329\item {\tt )cd} {\it directory}
330\end{items}
331
332\par\noindent{\bf Command Description:}
333
334This command sets the \Language{} working current directory.
335The current directory is used for looking for
336input files (for {\tt )read}),
337\Language{} library source files (for {\tt )compile}),
338saved history environment files (for {\tt )history )restore}),
339compiled \Language{} library files (for \spadsys{)library}), and
340files to edit (for {\tt )edit}).
341It is also used for writing
342spool files (via {\tt )spool}),
343writing history input files (via {\tt )history )write}) and
344history environment files (via {\tt )history )save}),and
345compiled \Language{} library files (via {\tt )compile}).
346%-% \HDsyscmdindex{read}{ugSysCmdcdPage}{B.4.}{)cd}
347%-% \HDsyscmdindex{compile}{ugSysCmdcdPage}{B.4.}{)cd}
348%-% \HDsyscmdindex{history )restore}{ugSysCmdcdPage}{B.4.}{)cd}
349%-% \HDsyscmdindex{edit}{ugSysCmdcdPage}{B.4.}{)cd}
350%-% \HDsyscmdindex{spool}{ugSysCmdcdPage}{B.4.}{)cd}
351%-% \HDsyscmdindex{history )write}{ugSysCmdcdPage}{B.4.}{)cd}
352%-% \HDsyscmdindex{history )save}{ugSysCmdcdPage}{B.4.}{)cd}
353
354If issued with no argument, this command sets the \Language{}
355current directory to your home directory.
356If an argument is used, it must be a valid directory name.
357Except for the ``{\tt )}'' at the beginning of the command,
358this has the same syntax as the operating system {\tt cd} command.
359
360\par\noindent{\bf Also See:}
361\downlink{``\ugSysCmdcompileTitle''}{ugSysCmdcompilePage} in section \ugSysCmdcompileNumber
362\downlink{``\ugSysCmdeditTitle''}{ugSysCmdeditPage} in section \ugSysCmdeditNumber
363\downlink{``\ugSysCmdhistoryTitle''}{ugSysCmdhistoryPage} in section \ugSysCmdhistoryNumber
364\downlink{``\ugSysCmdlibraryTitle''}{ugSysCmdlibraryPage} in section \ugSysCmdlibraryNumber
365\downlink{``\ugSysCmdreadTitle''}{ugSysCmdreadPage} in section \ugSysCmdreadNumber
366\downlink{``\ugSysCmdspoolTitle''}{ugSysCmdspoolPage} in section \ugSysCmdspoolNumber
367
368\endscroll
369\autobuttons
370\end{page}
371%
372%
373\newcommand{\ugSysCmdcloseTitle}{)close}
374\newcommand{\ugSysCmdcloseNumber}{B.5.}
375%
376% =====================================================================
377\begin{page}{ugSysCmdclosePage}{B.5. )close}
378% =====================================================================
379\beginscroll
380%-% \HDsyscmdindex{close}{ugSysCmdclosePage}{B.5.}{)close}
381
382
383\par\noindent{\bf User Level Required:} interpreter
384
385\par\noindent{\bf Command Syntax:}
386\begin{items}
387\item{\tt )close}
388\item{\tt )close )quietly}
389\end{items}
390\par\noindent{\bf Command Description:}
391
392This command is used to close down interpreter client processes.
393Such processes are started by \HyperName{} to run \Language{} examples
394when you click on their text. When you have finished examining or modifying the
395example and you do not want the extra window around anymore, issue
396\begin{verbatim}
397)close
398\end{verbatim}
399to the \Language{} prompt in the window.
400
401If you try to close down the last remaining interpreter client
402process, \Language{} will offer to close down the entire \Language{}
403session and return you to the operating system by displaying something
404like
405\begin{verbatim}
406   This is the last FriCAS session. Do you want to kill FriCAS?
407\end{verbatim}
408Type "y" (followed by the Return key) if this is what you had in mind.
409Type "n" (followed by the Return key) to cancel the command.
410
411You can use the {\tt )quietly} option to force \Language{} to
412close down the interpreter client process without closing down
413the entire \Language{} session.
414
415\par\noindent{\bf Also See:}
416\downlink{``\ugSysCmdquitTitle''}{ugSysCmdquitPage} in section \ugSysCmdquitNumber
417\downlink{``\ugSysCmdpquitTitle''}{ugSysCmdpquitPage} in section \ugSysCmdpquitNumber
418
419
420
421\endscroll
422\autobuttons
423\end{page}
424%
425%
426\newcommand{\ugSysCmdclearTitle}{)clear}
427\newcommand{\ugSysCmdclearNumber}{B.6.}
428%
429% =====================================================================
430\begin{page}{ugSysCmdclearPage}{B.6. )clear}
431% =====================================================================
432\beginscroll
433%-% \HDsyscmdindex{clear}{ugSysCmdclearPage}{B.6.}{)clear}
434
435
436\par\noindent{\bf User Level Required:} interpreter
437
438\par\noindent{\bf Command Syntax:}
439\begin{items}
440\item{\tt )clear all}
441\item{\tt )clear completely}
442\item{\tt )clear properties all}
443\item{\tt )clear properties}  {\it obj1 \lanb{}obj2 ...\ranb{}}
444\item{\tt )clear value      all}
445\item{\tt )clear value}     {\it obj1 \lanb{}obj2 ...\ranb{}}
446\item{\tt )clear mode       all}
447\item{\tt )clear mode}      {\it obj1 \lanb{}obj2 ...\ranb{}}
448\end{items}
449\par\noindent{\bf Command Description:}
450
451This command is used to remove function and variable declarations, definitions
452and values  from the workspace.
453To  empty the entire workspace  and reset the
454step counter to 1, issue
455\begin{verbatim}
456)clear all
457\end{verbatim}
458To remove everything in the workspace but not reset the step counter, issue
459\begin{verbatim}
460)clear properties all
461\end{verbatim}
462To remove everything about the object {\tt x}, issue
463\begin{verbatim}
464)clear properties x
465\end{verbatim}
466To remove everything about the objects {\tt x, y} and {\tt f}, issue
467\begin{verbatim}
468)clear properties x y f
469\end{verbatim}
470
471The word {\tt properties} may be abbreviated to the single letter
472``{\tt p}''.
473\begin{verbatim}
474)clear p all
475)clear p x
476)clear p x y f
477\end{verbatim}
478All definitions of functions and values of variables may be removed by either
479\begin{verbatim}
480)clear value all
481)clear v all
482\end{verbatim}
483This retains whatever declarations the objects had.  To remove definitions and
484values for the specific objects {\tt x, y} and {\tt f}, issue
485\begin{verbatim}
486)clear value x y f
487)clear v x y f
488\end{verbatim}
489To remove  the declarations  of everything while  leaving the  definitions and
490values, issue
491\begin{verbatim}
492)clear mode  all
493)clear m all
494\end{verbatim}
495To remove declarations for the specific objects {\tt x, y} and {\tt f}, issue
496\begin{verbatim}
497)clear mode x y f
498)clear m x y f
499\end{verbatim}
500The {\tt )display names} and {\tt )display properties} commands  may be used
501to see what is currently in the workspace.
502
503The command
504\begin{verbatim}
505)clear completely
506\end{verbatim}
507does everything that {\tt )clear all} does, and also clears the internal
508system function and constructor caches.
509
510\par\noindent{\bf Also See:}
511\downlink{``\ugSysCmddisplayTitle''}{ugSysCmddisplayPage} in section \ugSysCmddisplayNumber
512\downlink{``\ugSysCmdhistoryTitle''}{ugSysCmdhistoryPage} in section \ugSysCmdhistoryNumber
513\downlink{``\ugSysCmdundoTitle''}{ugSysCmdundoPage} in section \ugSysCmdundoNumber
514
515
516\endscroll
517\autobuttons
518\end{page}
519%
520%
521\newcommand{\ugSysCmdcompileTitle}{)compile}
522\newcommand{\ugSysCmdcompileNumber}{B.7.}
523%
524% =====================================================================
525\begin{page}{ugSysCmdcompilePage}{B.7. )compile}
526% =====================================================================
527\beginscroll
528%-% \HDsyscmdindex{compile}{ugSysCmdcompilePage}{B.7.}{)compile}
529
530
531\par\noindent{\bf User Level Required:} compiler
532
533\par\noindent{\bf Command Syntax:}
534
535\begin{items}
536\item {\tt )compile}
537\item {\tt )compile {\it fileName}}
538\item {\tt )compile {\it fileName}.as}
539\item {\tt )compile {\it directory/fileName}.as}
540\item {\tt )compile {\it fileName}.ao}
541\item {\tt )compile {\it directory/fileName}.ao}
542\item {\tt )compile {\it fileName}.al}
543\item {\tt )compile {\it directory/fileName}.al}
544\item {\tt )compile {\it fileName}.lsp}
545\item {\tt )compile {\it directory/fileName}.lsp}
546\item {\tt )compile {\it fileName}.spad}
547\item {\tt )compile {\it directory/fileName}.spad}
548\item {\tt )compile {\it fileName} )new}
549\item {\tt )compile {\it fileName} )old}
550\item {\tt )compile {\it fileName} )quiet}
551\item {\tt )compile {\it fileName} )noquiet}
552\item {\tt )compile {\it fileName} )moreargs}
553\item {\tt )compile {\it fileName} )onlyargs}
554\item {\tt )compile {\it fileName} )break}
555\item {\tt )compile {\it fileName} )nobreak}
556\item {\tt )compile {\it fileName} )library}
557\item {\tt )compile {\it fileName} )nolibrary}
558\item {\tt )compile {\it fileName} )vartrace}
559\item {\tt )compile {\it fileName} )constructor} {\it nameOrAbbrev}
560\end{items}
561
562\par\noindent{\bf Command Description:}
563
564You use this command to invoke the \aldor{} library compiler or
565the \Language{} system compiler.
566The {\tt )compile} system command is actually a combination of
567\Language{} processing and a call to the \aldor{} compiler.
568It is performing double-duty, acting as a front-end to
569both the \aldor{} compiler and the \Language{} system
570compiler.
571(The \Language{} system compiler is written in Boot and is
572an integral part of the \Language{} environment.
573The \aldor{} compiler is written in C and executed by the operating system
574when called from within \Language{}.)
575
576The command compiles files with file extensions {\it .as, .ao}
577and {\it .al} with the
578\aldor{} compiler and files with file extension {\it .spad} with the
579\Language{} system compiler.
580It also can compile files with file extension {\it .lsp}. These
581are assumed to be Lisp files generated by the \aldor{}
582compiler.
583If you omit the file extension, the command looks to see if you
584have specified the {\tt )new} or {\tt )old} option.
585If you have given one of these options, the corresponding compiler
586is used.
587Otherwise, the command first looks in the standard system
588directories for files with extension {\it .as, .ao} and {\it
589.al} and then files with extension {\it .spad}.
590The first file found has the appropriate compiler invoked on it.
591If the command cannot find a matching file, an error message is
592displayed and the command terminates.
593
594We now describe the options for the \aldor{} compiler.
595
596The first thing {\tt )compile} does is look for a source code
597filename among its arguments.
598Thus
599\begin{verbatim}
600)compile mycode.as
601)compile /u/jones/as/mycode.as
602)compile mycode
603\end{verbatim}
604all invoke {\tt )compiler} on the file {\tt
605/u/jones/as/mycode.as} if the current \Language{} working
606directory is {\tt /u/jones/as.} (Recall that you can set the
607working directory via the {\tt )cd} command. If you don't set it
608explicitly, it is the directory from which you started
609\Language{}.)
610
611This is frequently all you need to compile your file.
612This simple command:
613\indent{4}
614\beginitems
615\item[1. ] invokes the \aldor{} compiler and produces Lisp output,
616\item[2. ] calls the Lisp compiler if the \aldor{} compilation was
617successful,
618\item[3. ] uses the {\tt )library} command to tell \Language{} about
619the contents of your compiled file and arrange to have those
620contents loaded on demand.
621\enditems
622\indent{0}
623
624Should you not want the {\tt )library} command automatically
625invoked, call {\tt )compile} with the {\tt )nolibrary} option.
626For example,
627\begin{verbatim}
628)compile mycode.as )nolibrary
629\end{verbatim}
630
631The general description of \aldor{} command line arguments is in
632the \aldor{} documentation.
633The default options used by the {\tt )compile} command can be
634viewed and set using the {\tt )set compiler args} \Language{}
635system command.
636The current defaults are
637\begin{verbatim}
638-O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS
639-Y $FRICAS/algebra -I $FRICAS/algebra
640\end{verbatim}
641These options mean:
642\indent{4}
643\beginitems
644\item[-] {\tt -O}: perform all optimizations,
645\item[-] {\tt -Fasy}: generate a {\tt .asy} file,
646\item[-] {\tt -Fao}: generate a {\tt .ao} file,
647\item[-] {\tt -Flsp}: generate a {\tt .lsp} (Lisp)
648file,
649%-% \HDindex{Lisp!code generation}{ugSysCmdcompilePage}{B.7.}{)compile}
650\item[-] {\tt -lfricas}: use the {\tt fricas} library {\tt libfricas.al},
651\item[-] {\tt -Mno-ALDOR\_W\_WillObsolete}: do not display messages
652about older generated files becoming obsolete, and
653\item[-] {\tt -DFriCAS}: define the global assertion {\tt FriCAS} so that the
654\aldor{} libraries for generating stand-alone code
655are not accidentally used with \Language{}.
656\enditems
657\indent{0}
658
659To supplement these default arguments, use the {\tt )moreargs} option on
660{\tt )compile.}
661For example,
662\begin{verbatim}
663)compile mycode.as )moreargs "-v"
664\end{verbatim}
665uses the default arguments and appends the {\tt -v} (verbose)
666argument flag.
667The additional argument specification {\bf must be enclosed in
668double quotes.}
669
670To completely replace these default arguments for a particular
671use of {\tt )compile}, use the {\tt )onlyargs} option.
672For example,
673\begin{verbatim}
674)compile mycode.as )onlyargs "-v -O"
675\end{verbatim}
676only uses the {\tt -v} (verbose) and {\tt -O} (optimize)
677arguments.
678The argument specification {\bf must be enclosed in double quotes.}
679In this example, Lisp code is not produced and so the compilation
680output will not be available to \Language{}.
681
682To completely replace the default arguments for all calls to {\tt
683)compile} within your \Language{} session, use {\tt )set compiler args.}
684For example, to use the above arguments for all compilations, issue
685\begin{verbatim}
686)set compiler args "-v -O"
687\end{verbatim}
688Make sure you include the necessary {\tt -l} and {\tt -Y}
689arguments along with those needed for Lisp file creation.
690As above, {\bf the argument specification must be enclosed in double
691quotes.}
692
693By default, the {\tt )library} system command {\it exposes} all
694domains and categories it processes.
695This means that the \Language{} interpreter will consider those
696domains and categories when it is trying to resolve a reference
697to a function.
698Sometimes domains and categories should not be exposed.
699For example, a domain may just be used privately by another
700domain and may not be meant for top-level use.
701The {\tt )library} command should still be used, though, so that
702the code will be loaded on demand.
703In this case, you should use the {\tt )nolibrary} option on {\tt
704)compile} and the {\tt )noexpose} option in the {\tt )library}
705command. For example,
706\begin{verbatim}
707)compile mycode.as )nolibrary
708)library mycode )noexpose
709\end{verbatim}
710
711Once you have established your own collection of compiled code,
712you may find it handy to use the {\tt )dir} option on the
713{\tt )library} command.
714This causes {\tt )library} to process all compiled code in the
715specified directory. For example,
716\begin{verbatim}
717)library )dir /u/jones/as/quantum
718\end{verbatim}
719You must give an explicit directory after {\tt )dir}, even if you
720want all compiled code in the current working directory
721processed, e.g.
722\begin{verbatim}
723)library )dir .
724\end{verbatim}
725
726The {\tt )compile} command works with several file extensions. We saw
727above what happens when it is invoked on a file with extension {\tt
728.as.} A {\tt .ao} file is a portable binary compiled version of a
729{\tt .as} file, and {\tt )compile} simply passes the {\tt .ao} file
730onto \aldor{}. The generated Lisp file is compiled and {\tt )library}
731is automatically called, just as if you had specified a {\tt .as} file.
732
733A {\tt .al} file is an archive file containing {\tt .ao} files. The
734archive is created (on Unix systems) with the {\tt ar} program. When
735{\tt )compile} is given a {\tt .al} file, it creates a directory whose
736name is based on that of the archive. For example, if you issue
737\begin{verbatim}
738)compile mylib.al
739\end{verbatim}
740the directory {\tt mylib.axldir} is created. All
741members of the archive are unarchived into the
742directory and {\tt )compile} is called on each {\tt .ao} file found. It
743is your responsibility to remove the directory and its contents, if you
744choose to do so.
745
746A {\tt .lsp} file is a Lisp source file, presumably, in our context,
747generated by \aldor{} when called with the {\tt -Flsp} option. When
748{\tt )compile} is used with a {\tt .lsp} file, the Lisp file is
749compiled and {\tt )library} is called. You must also have present a
750{\tt .asy} generated from the same source file.
751
752The following are descriptions of options for the \Language{} system compiler.
753
754You can compile category, domain, and package constructors
755contained in files with file extension {\it .spad}.
756You can compile individual constructors or every constructor
757in a file.
758
759The full filename is remembered between invocations of this command and
760{\tt )edit} commands.
761The sequence of commands
762\begin{verbatim}
763)compile matrix.spad
764)edit
765)compile
766\end{verbatim}
767will call the compiler, edit, and then call the compiler again
768on the file {\bf matrix.spad.}
769If you do not specify a {\it directory,} the working current
770directory (see \downlink{``\ugSysCmdcdTitle''}{ugSysCmdcdPage} in Section \ugSysCmdcdNumber\ignore{ugSysCmdcd})
771is searched for the file.
772If the file is not found, the standard system directories are searched.
773
774If you do not give any options, all constructors within a file are
775compiled.
776Each constructor should have an {\tt )abbreviation} command in
777the file in which it is defined.
778We suggest that you place the {\tt )abbreviation} commands at the
779top of the file in the order in which the constructors are
780defined.
781The list of commands serves as a table of contents for the file.
782%-% \HDsyscmdindex{abbreviation}{ugSysCmdcompilePage}{B.7.}{)compile}
783
784The {\tt )library} option causes directories containing the
785compiled code for each constructor
786to be created in the working current directory.
787The name of such a directory consists of the constructor
788abbreviation and the {\bf .NRLIB} file extension.
789For example, the directory containing the compiled code for
790the \spadtype{MATRIX} constructor is called {\bf MATRIX.NRLIB.}
791The {\tt )nolibrary} option says that such files should not
792be created.
793The default is {\tt )library.}
794Note that the semantics of {\tt )library} and {\tt )nolibrary}
795for the \aldor{} compiler and for the \Language{} system compiler are
796completely different.
797
798The {\tt )vartrace} option causes the compiler to generate
799extra code for the constructor to support conditional tracing of
800variable assignments. (see \downlink{``\ugSysCmdtraceTitle''}{ugSysCmdtracePage} in Section \ugSysCmdtraceNumber\ignore{ugSysCmdtrace}). Without
801this option, this code is suppressed and one cannot use
802the {\tt )vars} option for the trace command.
803
804The {\tt )constructor} option is used to
805specify a particular constructor to compile.
806All other constructors in the file are ignored.
807The constructor name or abbreviation follows {\tt )constructor.}
808Thus either
809\begin{verbatim}
810)compile matrix.spad )constructor RectangularMatrix
811\end{verbatim}
812or
813\begin{verbatim}
814)compile matrix.spad )constructor RMATRIX
815\end{verbatim}
816compiles  the \spadtype{RectangularMatrix} constructor
817defined in {\bf matrix.spad.}
818
819The {\tt )break} and {\tt )nobreak} options determine what
820the \Language system compiler does when it encounters an error.
821{\tt )break} is the default and it indicates that processing
822should stop at the first error.
823The value of the {\tt )set break} variable then controls what happens.
824
825
826%% BEGIN OBSOLTE
827%% END OBSOLTE
828
829\par\noindent{\bf Also See:}
830\downlink{``\ugSysCmdabbreviationTitle''}{ugSysCmdabbreviationPage} in section \ugSysCmdabbreviationNumber
831\downlink{``\ugSysCmdeditTitle''}{ugSysCmdeditPage} in section \ugSysCmdeditNumber
832\downlink{``\ugSysCmdlibraryTitle''}{ugSysCmdlibraryPage} in section \ugSysCmdlibraryNumber
833
834
835\endscroll
836\autobuttons
837\end{page}
838%
839%
840\newcommand{\ugSysCmddisplayTitle}{)display}
841\newcommand{\ugSysCmddisplayNumber}{B.8.}
842%
843% =====================================================================
844\begin{page}{ugSysCmddisplayPage}{B.8. )display}
845% =====================================================================
846\beginscroll
847%-% \HDsyscmdindex{display}{ugSysCmddisplayPage}{B.8.}{)display}
848
849
850\par\noindent{\bf User Level Required:} interpreter
851
852\par\noindent{\bf Command Syntax:}
853\begin{items}
854\item {\tt )display all}
855\item {\tt )display properties}
856\item {\tt )display properties all}
857\item {\tt )display properties} {\it \lanb{}obj1 \lanb{}obj2 ...\ranb{}\ranb{}}
858\item {\tt )display value all}
859\item {\tt )display value} {\it \lanb{}obj1 \lanb{}obj2 ...\ranb{}\ranb{}}
860\item {\tt )display mode all}
861\item {\tt )display mode} {\it \lanb{}obj1 \lanb{}obj2 ...\ranb{}\ranb{}}
862\item {\tt )display names}
863\item {\tt )display operations} {\it opName}
864\end{items}
865\par\noindent{\bf Command Description:}
866
867This command is  used to display the contents of  the workspace and
868signatures of functions  with a  given  name.\footnote{A
869\spadgloss{signature} gives the argument and return types of a
870function.}
871
872The command
873\begin{verbatim}
874)display names
875\end{verbatim}
876lists the names of all user-defined  objects in the workspace.  This is useful
877if you do  not wish to see everything  about the objects and need  only be
878reminded of their names.
879
880The commands
881\begin{verbatim}
882)display all
883)display properties
884)display properties all
885\end{verbatim}
886all do  the same thing: show  the values and  types and declared modes  of all
887variables in the  workspace.  If you have defined  functions, their signatures
888and definitions will also be displayed.
889
890To show all information about a  particular variable or user functions,
891for example, something named {\tt d}, issue
892\begin{verbatim}
893)display properties d
894\end{verbatim}
895To just show the value (and the type) of {\tt d}, issue
896\begin{verbatim}
897)display value d
898\end{verbatim}
899To just show the declared mode of {\tt d}, issue
900\begin{verbatim}
901)display mode d
902\end{verbatim}
903
904All modemaps for a given operation  may be
905displayed by using {\tt )display operations}.
906A \spadgloss{modemap} is a collection of information about  a particular
907reference
908to an  operation.  This  includes the  types of the  arguments and  the return
909value, the  location of the  implementation and  any conditions on  the types.
910The modemap may contain patterns.  The following displays the modemaps for the
911operation \spadfunFrom{complex}{ComplexCategory}:
912\begin{verbatim}
913)d op complex
914\end{verbatim}
915
916\par\noindent{\bf Also See:}
917\downlink{``\ugSysCmdclearTitle''}{ugSysCmdclearPage} in section \ugSysCmdclearNumber
918\downlink{``\ugSysCmdhistoryTitle''}{ugSysCmdhistoryPage} in section \ugSysCmdhistoryNumber
919\downlink{``\ugSysCmdsetTitle''}{ugSysCmdsetPage} in section \ugSysCmdsetNumber
920\downlink{``\ugSysCmdshowTitle''}{ugSysCmdshowPage} in section \ugSysCmdshowNumber
921\downlink{``\ugSysCmdwhatTitle''}{ugSysCmdwhatPage} in section \ugSysCmdwhatNumber
922
923
924\endscroll
925\autobuttons
926\end{page}
927%
928%
929\newcommand{\ugSysCmdeditTitle}{)edit}
930\newcommand{\ugSysCmdeditNumber}{B.9.}
931%
932% =====================================================================
933\begin{page}{ugSysCmdeditPage}{B.9. )edit}
934% =====================================================================
935\beginscroll
936%-% \HDsyscmdindex{edit}{ugSysCmdeditPage}{B.9.}{)edit}
937
938
939\par\noindent{\bf User Level Required:} interpreter
940
941\par\noindent{\bf Command Syntax:}
942\begin{items}
943\item{\tt )edit} \lanb{}{\it filename}\ranb{}
944\end{items}
945\par\noindent{\bf Command Description:}
946
947This command is  used to edit files.
948It works in conjunction  with the {\tt )read}
949and {\tt )compile} commands to remember the name
950of the file on which you are working.
951By specifying the name fully, you  can edit any file you wish.
952Thus
953\begin{verbatim}
954)edit /u/julius/matrix.input
955\end{verbatim}
956will place  you in an editor looking at the  file
957{\tt /u/julius/matrix.input}.
958%-% \HDindex{editing files}{ugSysCmdeditPage}{B.9.}{)edit}
959By default, the editor is {\tt vi},
960%-% \HDindex{vi}{ugSysCmdeditPage}{B.9.}{)edit}
961but if you have an EDITOR shell environment variable defined, that editor
962will be used.
963When \Language{} is running under the X Window System,
964it will try to open a separate {\tt xterm} running your editor if
965it thinks one is necessary.
966%-% \HDindex{Korn shell}{ugSysCmdeditPage}{B.9.}{)edit}
967For example, under the Korn shell, if you issue
968\begin{verbatim}
969export EDITOR=emacs
970\end{verbatim}
971then the emacs
972%-% \HDindex{emacs}{ugSysCmdeditPage}{B.9.}{)edit}
973editor will be used by \spadsys{)edit}.
974
975If you do not specify a file name, the last file you edited,
976read or compiled will be used.
977If there is no ``last file'' you will be placed in the editor editing
978an empty unnamed file.
979
980It is possible to use the {\tt )system} command to edit a file directly.
981For example,
982\begin{verbatim}
983)system emacs /etc/rc.tcpip
984\end{verbatim}
985calls {\tt emacs} to edit the file.
986%-% \HDindex{emacs}{ugSysCmdeditPage}{B.9.}{)edit}
987
988\par\noindent{\bf Also See:}
989\downlink{``\ugSysCmdsystemTitle''}{ugSysCmdsystemPage} in section \ugSysCmdsystemNumber
990\downlink{``\ugSysCmdcompileTitle''}{ugSysCmdcompilePage} in section \ugSysCmdcompileNumber
991\downlink{``\ugSysCmdreadTitle''}{ugSysCmdreadPage} in section \ugSysCmdreadNumber
992
993
994\endscroll
995\autobuttons
996\end{page}
997%
998%
999\newcommand{\ugSysCmdfinTitle}{)fin}
1000\newcommand{\ugSysCmdfinNumber}{B.10.}
1001%
1002% =====================================================================
1003\begin{page}{ugSysCmdfinPage}{B.10. )fin}
1004% =====================================================================
1005\beginscroll
1006%-% \HDsyscmdindex{fin}{ugSysCmdfinPage}{B.10.}{)fin}
1007
1008
1009\par\noindent{\bf User Level Required:} development
1010
1011\par\noindent{\bf Command Syntax:}
1012\begin{items}
1013\item {\tt )fin}
1014\end{items}
1015\par\noindent{\bf Command Description:}
1016
1017This command is used by \Language{}
1018developers to leave the \Language{} system and return
1019to the underlying \Lisp{} system.
1020To return to \Language{}, issue the
1021``{\tt (|spad|)}''
1022function call to \Lisp{}.
1023
1024\par\noindent{\bf Also See:}
1025\downlink{``\ugSysCmdpquitTitle''}{ugSysCmdpquitPage} in section \ugSysCmdpquitNumber
1026\downlink{``\ugSysCmdquitTitle''}{ugSysCmdquitPage} in section \ugSysCmdquitNumber
1027
1028
1029\endscroll
1030\autobuttons
1031\end{page}
1032%
1033%
1034\newcommand{\ugSysCmdframeTitle}{)frame}
1035\newcommand{\ugSysCmdframeNumber}{B.11.}
1036%
1037% =====================================================================
1038\begin{page}{ugSysCmdframePage}{B.11. )frame}
1039% =====================================================================
1040\beginscroll
1041%-% \HDsyscmdindex{frame}{ugSysCmdframePage}{B.11.}{)frame}
1042
1043
1044\par\noindent{\bf User Level Required:} interpreter
1045
1046\par\noindent{\bf Command Syntax:}
1047\begin{items}
1048\item{\tt )frame  new  {\it frameName}}
1049\item{\tt )frame  drop  {\it \lanb{}frameName\ranb{}}}
1050\item{\tt )frame  next}
1051\item{\tt )frame  last}
1052\item{\tt )frame  names}
1053\item{\tt )frame  import {\it frameName} {\it \lanb{}objectName1 \lanb{}objectName2 ...\ranb{}\ranb{}}}
1054\item{\tt )set message frame on | off}
1055\item{\tt )set message prompt frame}
1056\end{items}
1057
1058\par\noindent{\bf Command Description:}
1059
1060A {\it frame} can be thought of as a logical session within the
1061physical session that you get when you start the system.  You can
1062have as many frames as you want, within the limits of your computer's
1063storage, paging space, and so on.
1064Each frame has its own {\it step number}, {\it environment} and {\it history.}
1065You can have a variable named {\tt a} in one frame and it will
1066have nothing to do with anything that might be called {\tt a} in
1067any other frame.
1068
1069Some frames are created by the \HyperName{} program and these can
1070have pretty strange names, since they are generated automatically.
1071%-% \HDsyscmdindex{frame names}{ugSysCmdframePage}{B.11.}{)frame}
1072To find out the names
1073of all frames, issue
1074\begin{verbatim}
1075)frame names
1076\end{verbatim}
1077It will indicate the name of the current frame.
1078
1079You create a new frame
1080%-% \HDsyscmdindex{frame new}{ugSysCmdframePage}{B.11.}{)frame}
1081``{\bf quark}'' by issuing
1082\begin{verbatim}
1083)frame new quark
1084\end{verbatim}
1085The history facility can be turned on by issuing either
1086{\tt )set history on} or {\tt )history )on}.
1087If the history facility is on and you are saving history information
1088in a file rather than in the \Language{} environment
1089then a history file with filename {\bf quark.axh} will
1090be created as you enter commands.
1091If you wish to go back to what
1092you were doing in the
1093%-% \HDsyscmdindex{frame next}{ugSysCmdframePage}{B.11.}{)frame}
1094``{\bf initial}'' frame, use
1095%-% \HDsyscmdindex{frame last}{ugSysCmdframePage}{B.11.}{)frame}
1096\begin{verbatim}
1097)frame next
1098\end{verbatim}
1099or
1100\begin{verbatim}
1101)frame last
1102\end{verbatim}
1103to cycle through the ring of available frames to get back to
1104``{\bf initial}''.
1105
1106If you want to throw
1107away a frame (say ``{\bf quark}''), issue
1108\begin{verbatim}
1109)frame drop quark
1110\end{verbatim}
1111If you omit the name, the current frame is dropped.
1112%-% \HDsyscmdindex{frame drop}{ugSysCmdframePage}{B.11.}{)frame}
1113
1114If you do use frames with the history facility on and writing to a file,
1115you may want to delete some of the older history files.
1116%-% \HDindex{file!history}{ugSysCmdframePage}{B.11.}{)frame}
1117These are directories, so you may want to issue a command like
1118{\tt rm -r quark.axh} to the operating system.
1119
1120You can bring things from another frame by using
1121%-% \HDsyscmdindex{frame import}{ugSysCmdframePage}{B.11.}{)frame}
1122{\tt )frame import}.
1123For example, to bring the {\tt f} and {\tt g} from the frame ``{\bf quark}''
1124to the current frame, issue
1125\begin{verbatim}
1126)frame import quark f g
1127\end{verbatim}
1128If you want everything from the frame ``{\bf quark}'', issue
1129\begin{verbatim}
1130)frame import quark
1131\end{verbatim}
1132You will be asked to verify that you really want everything.
1133
1134There are two {\tt )set} flags
1135%-% \HDsyscmdindex{set message frame}{ugSysCmdframePage}{B.11.}{)frame}
1136to make it easier to tell where you are.
1137\begin{verbatim}
1138)set message frame on | off
1139\end{verbatim}
1140will print more messages about frames when it is set on.
1141By default, it is off.
1142\begin{verbatim}
1143)set message prompt frame
1144\end{verbatim}
1145will give a prompt
1146%-% \HDsyscmdindex{set message prompt frame}{ugSysCmdframePage}{B.11.}{)frame}
1147that looks like
1148\begin{verbatim}
1149initial (1) ->
1150\end{verbatim}
1151%-% \HDindex{prompt!with frame name}{ugSysCmdframePage}{B.11.}{)frame}
1152when you start up. In this case, the frame name and step make up the
1153prompt.
1154
1155\par\noindent{\bf Also See:}
1156\downlink{``\ugSysCmdhistoryTitle''}{ugSysCmdhistoryPage} in section \ugSysCmdhistoryNumber
1157\downlink{``\ugSysCmdsetTitle''}{ugSysCmdsetPage} in section \ugSysCmdsetNumber
1158
1159
1160\endscroll
1161\autobuttons
1162\end{page}
1163%
1164%
1165\newcommand{\ugSysCmdhelpTitle}{)help}
1166\newcommand{\ugSysCmdhelpNumber}{B.12.}
1167%
1168% =====================================================================
1169\begin{page}{ugSysCmdhelpPage}{B.12. )help}
1170% =====================================================================
1171\beginscroll
1172%-% \HDsyscmdindex{help}{ugSysCmdhelpPage}{B.12.}{)help}
1173
1174
1175\par\noindent{\bf User Level Required:} interpreter
1176
1177\par\noindent{\bf Command Syntax:}
1178\begin{items}
1179\item{\tt )help}
1180\item{\tt )help} {\it commandName}
1181\item{\tt )help} {\tt syntax}
1182\end{items}
1183
1184\par\noindent{\bf Command Description:}
1185
1186This command displays help information about system commands.
1187If you issue
1188\begin{verbatim}
1189)help help
1190\end{verbatim}
1191then this very text will be shown.
1192You can also give the name of a system command
1193to display information about it.
1194For example,
1195\begin{verbatim}
1196)help clear
1197\end{verbatim}
1198will display the description of the {\tt )clear} system command.
1199
1200The command
1201\begin{verbatim}
1202)help syntax
1203\end{verbatim}
1204will give further information about the FriCAS language syntax.
1205
1206All this material is available in the \Language{} User Guide
1207and in \HyperName{}.
1208In \HyperName{}, choose the {\bf Commands} item from the
1209{\bf Reference} menu.
1210
1211
1212
1213\endscroll
1214\autobuttons
1215\end{page}
1216%
1217%
1218\newcommand{\ugSysCmdhistoryTitle}{)history}
1219\newcommand{\ugSysCmdhistoryNumber}{B.13.}
1220%
1221% =====================================================================
1222\begin{page}{ugSysCmdhistoryPage}{B.13. )history}
1223% =====================================================================
1224\beginscroll
1225%-% \HDsyscmdindex{history}{ugSysCmdhistoryPage}{B.13.}{)history}
1226
1227
1228\par\noindent{\bf User Level Required:} interpreter
1229
1230\par\noindent{\bf Command Syntax:}
1231\begin{items}
1232\item{\tt )history )on}
1233\item{\tt )history )off}
1234\item{\tt )history )write} {\it historyInputFileName}
1235\item{\tt )history )show \lanb{}{\it n}\ranb{} \lanb{}both\ranb{}}
1236\item{\tt )history )save} {\it savedHistoryName}
1237\item{\tt )history )restore} \lanb{}{\it savedHistoryName}\ranb{}
1238\item{\tt )history )reset}
1239\item{\tt )history )change} {\it n}
1240\item{\tt )history )memory}
1241\item{\tt )history )file}
1242\item{\tt \%}
1243\item{\tt \%\%({\it n})}
1244\item{\tt )set history on | off}
1245\end{items}
1246
1247\par\noindent{\bf Command Description:}
1248
1249The {\it history} facility within \Language{} allows you to restore your
1250environment to that of another session and recall previous
1251computational results.
1252Additional commands allow you to review previous
1253input lines and to create an {\bf .input} file of the lines typed to
1254%-% \HDindex{file!input}{ugSysCmdhistoryPage}{B.13.}{)history}
1255\Language{}.
1256
1257\Language{} saves your input and output if the history facility is
1258turned on (which is the default).
1259This information is saved if either of
1260\begin{verbatim}
1261)set history on
1262)history )on
1263\end{verbatim}
1264has been issued.
1265Issuing either
1266\begin{verbatim}
1267)set history off
1268)history )off
1269\end{verbatim}
1270will discontinue the recording of information.
1271%-% \HDsyscmdindex{history )on}{ugSysCmdhistoryPage}{B.13.}{)history}
1272%-% \HDsyscmdindex{set history on}{ugSysCmdhistoryPage}{B.13.}{)history}
1273%-% \HDsyscmdindex{set history off}{ugSysCmdhistoryPage}{B.13.}{)history}
1274%-% \HDsyscmdindex{history )off}{ugSysCmdhistoryPage}{B.13.}{)history}
1275
1276Whether the facility is disabled or not,
1277the value of \spadSyntax{\%} in \Language{} always
1278refers to the result of the last computation.
1279If you have not yet entered anything,
1280\spadSyntax{\%} evaluates to an object of type
1281\spadtype{Variable('\%)}.
1282The function \spadSyntax{\%\%} may be  used to refer
1283to other previous results if the history facility is enabled.
1284In that case,
1285\spad{\%\%(n)} is  the output from step \spad{n} if \spad{n > 0}.
1286If \spad{n < 0}, the step is computed relative to the current step.
1287Thus \spad{\%\%(-1)} is also the previous step,
1288\spad{\%\%(-2)}, is the  step before that, and so on.
1289If an invalid step number is given, \Language{} will signal an error.
1290
1291The {\it environment} information can either be saved in a file or entirely in
1292memory (the default).
1293Each frame (\downlink{``\ugSysCmdframeTitle''}{ugSysCmdframePage} in Section \ugSysCmdframeNumber\ignore{ugSysCmdframe})
1294has its own history database.
1295When it is kept in a file, some of it may also be kept in memory for
1296efficiency.
1297When the information is saved in a file, the name of the file is
1298of the form {\bf FRAME.axh} where ``{\bf FRAME}'' is the name of the
1299current frame.
1300The history file is placed in the current working directory
1301(see \downlink{``\ugSysCmdcdTitle''}{ugSysCmdcdPage} in Section \ugSysCmdcdNumber\ignore{ugSysCmdcd}).
1302Note that these history database files are not text files (in fact,
1303they are directories themselves), and so are not in human-readable
1304format.
1305
1306The options to the {\tt )history} command are as follows:
1307
1308\indent{0}
1309\beginitems
1310\item[{\tt )change} {\it n}]
1311will set the number of steps that are saved in memory to {\it n}.
1312This option only has effect when the history data is maintained in a
1313file.
1314If you have issued {\tt )history )memory} (or not changed the default)
1315there is no need to use {\tt )history )change}.
1316%-% \HDsyscmdindex{history )change}{ugSysCmdhistoryPage}{B.13.}{)history}
1317
1318\item[{\tt )on}]
1319will start the recording of information.
1320If the workspace is not empty, you will be asked to confirm this
1321request.
1322If you do so, the workspace will be cleared and history data will begin
1323being saved.
1324You can also turn the facility on by issuing {\tt )set history on}.
1325
1326\item[{\tt )off}]
1327will stop the recording of information.
1328The {\tt )history )show} command will not work after issuing this
1329command.
1330Note that this command may be issued to save time, as there is some
1331performance penalty paid for saving the environment data.
1332You can also turn the facility off by issuing {\tt )set history off}.
1333
1334\item[{\tt )file}]
1335indicates that history data should be saved in an external file on disk.
1336
1337\item[{\tt )memory}]
1338indicates that all history data should be kept in memory rather than
1339saved in a file.
1340Note that if you are computing with very large objects it may not be
1341practical to kept this data in memory.
1342
1343\item[{\tt )reset}]
1344will flush the internal list of the most recent workspace calculations
1345so that the data structures may be garbage collected by the underlying
1346\Lisp{} system.
1347Like {\tt )history )change}, this option only has real effect when
1348history data is being saved in a file.
1349
1350\item[{\tt )restore} \lanb{}{\it savedHistoryName}\ranb{}]
1351completely clears the environment and restores it to a saved session, if
1352possible.
1353The {\tt )save} option below allows you to save a session to a file
1354with a given name. If you had issued
1355{\tt )history )save jacobi}
1356the command
1357{\tt )history )restore jacobi}
1358would clear the current workspace and load the contents of the named
1359saved session. If no saved session name is specified, the system looks
1360for a file called {\bf last.axh}.
1361
1362\item[{\tt )save} {\it savedHistoryName}]
1363is used to save  a snapshot of the environment in a file.
1364This file is placed in the current working directory
1365(see \downlink{``\ugSysCmdcdTitle''}{ugSysCmdcdPage} in Section \ugSysCmdcdNumber\ignore{ugSysCmdcd}).
1366Use {\tt )history )restore} to restore the environment to the state
1367preserved in the file.
1368This option also creates an input file containing all the lines of input
1369since you created the workspace frame (for example, by starting your
1370\Language{} session) or last did a \spadsys{)clear all} or
1371\spadsys{)clear completely}.
1372
1373\item[{\tt )show} \lanb{}{\it n}\ranb{} \lanb{}{\tt both}\ranb{}]
1374can show previous input lines and output results.
1375{\tt )show} will display up to twenty of the last input lines
1376(fewer if you haven't typed in twenty lines).
1377{\tt )show} {\it n} will display up to {\it n} of the last input lines.
1378{\tt )show both} will display up to five of the last input lines and
1379output results.
1380{\tt )show} {\it n} {\tt both} will display up to {\it n} of the last
1381input lines and output results.
1382
1383\item[{\tt )write} {\it historyInputFile}]
1384creates an {\bf .input} file with the input lines typed since the start
1385of the session/frame or the last {\tt )clear all} or {\tt )clear
1386completely}.
1387If {\it historyInputFileName} does not contain a period (``.'') in the filename,
1388{\bf .input} is appended to it.
1389For example,
1390{\tt )history )write chaos}
1391and
1392{\tt )history )write chaos.input}
1393both write the input lines to a file called {\bf chaos.input} in your
1394current working directory.
1395If you issued one or more {\tt )undo} commands,
1396{\tt )history )write}
1397eliminates all
1398input lines backtracked over as a result of {\tt )undo}.
1399You can edit this file and then use {\tt )read} to have \Language{} process
1400the contents.
1401\enditems
1402\indent{0}
1403
1404\par\noindent{\bf Also See:}
1405\downlink{``\ugSysCmdframeTitle''}{ugSysCmdframePage} in section \ugSysCmdframeNumber
1406\downlink{``\ugSysCmdreadTitle''}{ugSysCmdreadPage} in section \ugSysCmdreadNumber
1407\downlink{``\ugSysCmdsetTitle''}{ugSysCmdsetPage} in section \ugSysCmdsetNumber
1408\downlink{``\ugSysCmdundoTitle''}{ugSysCmdundoPage} in section \ugSysCmdundoNumber
1409
1410
1411\endscroll
1412\autobuttons
1413\end{page}
1414%
1415%
1416\newcommand{\ugSysCmdlibraryTitle}{)library}
1417\newcommand{\ugSysCmdlibraryNumber}{B.14.}
1418%
1419% =====================================================================
1420\begin{page}{ugSysCmdlibraryPage}{B.14. )library}
1421% =====================================================================
1422\beginscroll
1423%-% \HDsyscmdindex{library}{ugSysCmdlibraryPage}{B.14.}{)library}
1424
1425
1426\par\noindent{\bf User Level Required:} interpreter
1427
1428\par\noindent{\bf Command Syntax:}
1429\begin{items}
1430\item{\tt )library {\it libName1  \lanb{}libName2 ...\ranb{}}}
1431\item{\tt )library )dir {\it dirName}}
1432\item{\tt )library )only {\it objName1  \lanb{}objlib2 ...\ranb{}}}
1433\item{\tt )library )noexpose}
1434\end{items}
1435
1436\par\noindent{\bf Command Description:}
1437
1438This command replaces the {\tt )load} system command.
1439The \spadsys{)library} command makes available to \Language{} the compiled
1440objects in the libraries listed.
1441
1442For example, if you {\tt )compile dopler.as} in your home
1443directory, issue {\tt )library dopler} to have \Language{} look
1444at the library, determine the category and domain constructors present,
1445update the internal database with various properties of the
1446constructors, and arrange for the constructors to be
1447automatically loaded when needed.
1448If the {\tt )noexpose} option has not been given, the
1449constructors will be exposed (that is, available) in the current
1450frame.
1451
1452If you compiled a file with the \Language{} system compiler, you will
1453have an {\it NRLIB} present, for example, {\it DOPLER.NRLIB,}
1454where {\tt DOPLER} is a constructor abbreviation.
1455The command {\tt )library DOPLER} will then do the analysis and
1456database updates as above.
1457
1458To tell the system about all libraries in a directory, use
1459{\tt )library )dir dirName} where {\tt dirName} is an explicit
1460directory.
1461You may specify ``.'' as the directory, which means the current
1462directory from which you started the system or the one you set
1463via the \spadsys{)cd} command. The directory name is required.
1464
1465You may only want to tell the system about particular
1466constructors within a library. In this case, use the {\tt )only}
1467option. The command {\tt )library dopler )only Test1} will only
1468cause the {\sf Test1} constructor to be analyzed, autoloaded,
1469etc..
1470
1471Finally, each constructor in a library  are usually automatically exposed when the
1472\spadsys{)library} command is used. Use the {\tt )noexpose}
1473option if you do not want them exposed. At a later time you can use
1474{\tt )set expose add constructor} to expose any hidden
1475constructors.
1476
1477\par\noindent{\bf Also See:}
1478\downlink{``\ugSysCmdcdTitle''}{ugSysCmdcdPage} in section \ugSysCmdcdNumber
1479\downlink{``\ugSysCmdcompileTitle''}{ugSysCmdcompilePage} in section \ugSysCmdcompileNumber
1480\downlink{``\ugSysCmdframeTitle''}{ugSysCmdframePage} in section \ugSysCmdframeNumber
1481\downlink{``\ugSysCmdsetTitle''}{ugSysCmdsetPage} in section \ugSysCmdsetNumber
1482
1483\endscroll
1484\autobuttons
1485\end{page}
1486%
1487%
1488\newcommand{\ugSysCmdlispTitle}{)lisp}
1489\newcommand{\ugSysCmdlispNumber}{B.15.}
1490%
1491% =====================================================================
1492\begin{page}{ugSysCmdlispPage}{B.15. )lisp}
1493% =====================================================================
1494\beginscroll
1495%-% \HDsyscmdindex{lisp}{ugSysCmdlispPage}{B.15.}{)lisp}
1496
1497
1498\par\noindent{\bf User Level Required:} development
1499
1500\par\noindent{\bf Command Syntax:}
1501\begin{items}
1502\item {\tt )lisp} {\it\lanb{}lispExpression\ranb{}}
1503\end{items}
1504
1505\par\noindent{\bf Command Description:}
1506
1507This command is used by \Language{} system developers to have single
1508expressions evaluated by the \Lisp{} system on which
1509\Language{} is built.
1510The {\it lispExpression} is read by the \Lisp{} reader and
1511evaluated.
1512If this expression is not complete (unbalanced parentheses, say), the reader
1513will wait until a complete expression is entered.
1514
1515Since this command is only useful  for evaluating single expressions, the
1516{\tt )fin}
1517command may be used to  drop out  of \Language{}  into \Lisp{}.
1518
1519\par\noindent{\bf Also See:}
1520\downlink{``\ugSysCmdsystemTitle''}{ugSysCmdsystemPage} in section \ugSysCmdsystemNumber
1521\downlink{``\ugSysCmdbootTitle''}{ugSysCmdbootPage} in section \ugSysCmdbootNumber
1522\downlink{``\ugSysCmdfinTitle''}{ugSysCmdfinPage} in section \ugSysCmdfinNumber
1523
1524
1525
1526\endscroll
1527\autobuttons
1528\end{page}
1529%
1530%
1531\newcommand{\ugSysCmdloadTitle}{)load}
1532\newcommand{\ugSysCmdloadNumber}{B.16.}
1533%
1534% =====================================================================
1535\begin{page}{ugSysCmdloadPage}{B.16. )load}
1536% =====================================================================
1537\beginscroll
1538%-% \HDsyscmdindex{load}{ugSysCmdloadPage}{B.16.}{)load}
1539
1540
1541\par\noindent{\bf User Level Required:} interpreter
1542
1543%% BEGIN OBSOLETE
1544%% END OBSOLETE
1545
1546\par\noindent{\bf Command Description:}
1547
1548This command is obsolete. Use \spadsys{)library} instead.
1549
1550%% BEGIN OBSOLETE
1551
1552%
1553%
1554%
1555%
1556
1557%% END OBSOLETE
1558
1559
1560\endscroll
1561\autobuttons
1562\end{page}
1563%
1564%
1565\newcommand{\ugSysCmdltraceTitle}{)ltrace}
1566\newcommand{\ugSysCmdltraceNumber}{B.17.}
1567%
1568% =====================================================================
1569\begin{page}{ugSysCmdltracePage}{B.17. )ltrace}
1570% =====================================================================
1571\beginscroll
1572%-% \HDsyscmdindex{ltrace}{ugSysCmdltracePage}{B.17.}{)ltrace}
1573
1574
1575\par\noindent{\bf User Level Required:} development
1576
1577\par\noindent{\bf Command Syntax:}
1578
1579This command has the same arguments as options as the
1580\spadsys{)trace} command.
1581
1582\par\noindent{\bf Command Description:}
1583
1584This command is used by \Language{} system developers to trace
1585\Lisp{} or
1586BOOT functions.
1587It is not supported for general use.
1588
1589\par\noindent{\bf Also See:}
1590\downlink{``\ugSysCmdbootTitle''}{ugSysCmdbootPage} in section \ugSysCmdbootNumber
1591\downlink{``\ugSysCmdlispTitle''}{ugSysCmdlispPage} in section \ugSysCmdlispNumber
1592\downlink{``\ugSysCmdtraceTitle''}{ugSysCmdtracePage} in section \ugSysCmdtraceNumber
1593
1594
1595\endscroll
1596\autobuttons
1597\end{page}
1598%
1599%
1600\newcommand{\ugSysCmdpquitTitle}{)pquit}
1601\newcommand{\ugSysCmdpquitNumber}{B.18.}
1602%
1603% =====================================================================
1604\begin{page}{ugSysCmdpquitPage}{B.18. )pquit}
1605% =====================================================================
1606\beginscroll
1607%-% \HDsyscmdindex{pquit}{ugSysCmdpquitPage}{B.18.}{)pquit}
1608
1609
1610\par\noindent{\bf User Level Required:} interpreter
1611
1612\par\noindent{\bf Command Syntax:}
1613\begin{items}
1614\item{\tt )pquit}
1615\end{items}
1616
1617\par\noindent{\bf Command Description:}
1618
1619This command is used to terminate \Language{}  and return to the
1620operating system.
1621Other than by redoing all your computations or by
1622using the {\tt )history )restore}
1623command to try to restore your working environment,
1624you cannot return to \Language{} in the same state.
1625
1626{\tt )pquit} differs from the {\tt )quit} in that it always asks for
1627confirmation that you want to terminate \Language{} (the ``p'' is for
1628``protected'').
1629%-% \HDsyscmdindex{quit}{ugSysCmdpquitPage}{B.18.}{)pquit}
1630When you enter the {\tt )pquit} command, \Language{} responds
1631%
1632\centerline{{Please enter {\bf y} or {\bf yes} if you really want to leave the interactive }}
1633\centerline{{environment and return to the operating system:}}
1634%
1635If you respond with {\tt y} or {\tt yes}, you will see the message
1636%
1637\centerline{{You are now leaving the \Language{} interactive environment. }}
1638\centerline{{Issue the command {\bf fricas} to the operating system to start a new session.}}
1639%
1640and \Language{} will terminate and return you to the operating
1641system (or the environment from which you invoked the system).
1642If you responded with something other than {\tt y} or {\tt yes}, then
1643the message
1644%
1645\centerline{{You have chosen to remain in the \Language{} interactive environment.}}
1646%
1647will be displayed and, indeed, \Language{} would still be running.
1648
1649\par\noindent{\bf Also See:}
1650\downlink{``\ugSysCmdfinTitle''}{ugSysCmdfinPage} in section \ugSysCmdfinNumber
1651\downlink{``\ugSysCmdhistoryTitle''}{ugSysCmdhistoryPage} in section \ugSysCmdhistoryNumber
1652\downlink{``\ugSysCmdcloseTitle''}{ugSysCmdclosePage} in section \ugSysCmdcloseNumber
1653\downlink{``\ugSysCmdquitTitle''}{ugSysCmdquitPage} in section \ugSysCmdquitNumber
1654\downlink{``\ugSysCmdsystemTitle''}{ugSysCmdsystemPage} in section \ugSysCmdsystemNumber
1655
1656
1657\endscroll
1658\autobuttons
1659\end{page}
1660%
1661%
1662\newcommand{\ugSysCmdquitTitle}{)quit}
1663\newcommand{\ugSysCmdquitNumber}{B.19.}
1664%
1665% =====================================================================
1666\begin{page}{ugSysCmdquitPage}{B.19. )quit}
1667% =====================================================================
1668\beginscroll
1669%-% \HDsyscmdindex{quit}{ugSysCmdquitPage}{B.19.}{)quit}
1670
1671
1672\par\noindent{\bf User Level Required:} interpreter
1673
1674\par\noindent{\bf Command Syntax:}
1675\begin{items}
1676\item{\tt )quit}
1677\item{\tt )set quit protected | unprotected}
1678\end{items}
1679
1680\par\noindent{\bf Command Description:}
1681
1682This command is used to terminate \Language{}  and return to the
1683operating system.
1684Other than by redoing all your computations or by
1685using the {\tt )history )restore}
1686command to try to restore your working environment,
1687you cannot return to \Language{} in the same state.
1688
1689{\tt )quit} differs from the {\tt )pquit} in that it asks for
1690%-% \HDsyscmdindex{pquit}{ugSysCmdquitPage}{B.19.}{)quit}
1691confirmation only if the command
1692\begin{verbatim}
1693)set quit protected
1694\end{verbatim}
1695has been issued.
1696%-% \HDsyscmdindex{set quit protected}{ugSysCmdquitPage}{B.19.}{)quit}
1697Otherwise, {\tt )quit} will make \Language{} terminate and return you
1698to the operating system (or the environment from which you invoked the
1699system).
1700
1701The default setting is {\tt )set quit unprotected}.  We
1702%-% \HDsyscmdindex{set quit unprotected}{ugSysCmdquitPage}{B.19.}{)quit}
1703suggest that you do not (somehow) assign {\tt )quit} to be
1704executed when you press, say, a function key.
1705
1706\par\noindent{\bf Also See:}
1707\downlink{``\ugSysCmdfinTitle''}{ugSysCmdfinPage} in section \ugSysCmdfinNumber
1708\downlink{``\ugSysCmdhistoryTitle''}{ugSysCmdhistoryPage} in section \ugSysCmdhistoryNumber
1709\downlink{``\ugSysCmdcloseTitle''}{ugSysCmdclosePage} in section \ugSysCmdcloseNumber
1710\downlink{``\ugSysCmdpquitTitle''}{ugSysCmdpquitPage} in section \ugSysCmdpquitNumber
1711\downlink{``\ugSysCmdsystemTitle''}{ugSysCmdsystemPage} in section \ugSysCmdsystemNumber
1712
1713
1714\endscroll
1715\autobuttons
1716\end{page}
1717%
1718%
1719\newcommand{\ugSysCmdreadTitle}{)read}
1720\newcommand{\ugSysCmdreadNumber}{B.20.}
1721%
1722% =====================================================================
1723\begin{page}{ugSysCmdreadPage}{B.20. )read}
1724% =====================================================================
1725\beginscroll
1726%-% \HDsyscmdindex{read}{ugSysCmdreadPage}{B.20.}{)read}
1727
1728
1729\par\noindent{\bf User Level Required:} interpreter
1730
1731\par\noindent{\bf Command Syntax:}
1732\begin{items}
1733\item {\tt )read} {\it \lanb{}fileName\ranb{}}
1734\item {\tt )read} {\it \lanb{}fileName\ranb{}} \lanb{}{\tt )quiet}\ranb{} \lanb{}{\tt )ifthere}\ranb{}
1735\end{items}
1736\par\noindent{\bf Command Description:}
1737
1738This command is used to read {\bf .input} files into \Language{}.
1739%-% \HDindex{file!input}{ugSysCmdreadPage}{B.20.}{)read}
1740The command
1741\begin{verbatim}
1742)read matrix.input
1743\end{verbatim}
1744will read the contents of the file {\bf matrix.input} into
1745\Language{}.
1746The ``.input'' file extension is optional.
1747See \downlink{``\ugInOutInTitle''}{ugInOutInPage} in Section \ugInOutInNumber\ignore{ugInOutIn} for more information about {\bf .input} files.
1748
1749This command remembers the previous file you edited, read or compiled.
1750If you do not specify a file name, the previous file will be read.
1751
1752The {\tt )ifthere} option checks to see whether the {\bf .input} file
1753exists.
1754If it does not, the  {\tt )read} command does nothing.
1755If you do not use this option and the file does not exist,
1756you are asked to give the name of an existing {\bf .input} file.
1757
1758The {\tt )quiet} option suppresses output while the file is being read.
1759
1760\par\noindent{\bf Also See:}
1761\downlink{``\ugSysCmdcompileTitle''}{ugSysCmdcompilePage} in section \ugSysCmdcompileNumber
1762\downlink{``\ugSysCmdeditTitle''}{ugSysCmdeditPage} in section \ugSysCmdeditNumber
1763\downlink{``\ugSysCmdhistoryTitle''}{ugSysCmdhistoryPage} in section \ugSysCmdhistoryNumber
1764
1765
1766\endscroll
1767\autobuttons
1768\end{page}
1769%
1770%
1771\newcommand{\ugSysCmdsetTitle}{)set}
1772\newcommand{\ugSysCmdsetNumber}{B.21.}
1773%
1774% =====================================================================
1775\begin{page}{ugSysCmdsetPage}{B.21. )set}
1776% =====================================================================
1777\beginscroll
1778%-% \HDsyscmdindex{set}{ugSysCmdsetPage}{B.21.}{)set}
1779
1780
1781\par\noindent{\bf User Level Required:} interpreter
1782
1783\par\noindent{\bf Command Syntax:}
1784\begin{items}
1785\item {\tt )set}
1786\item {\tt )set} {\it label1 \lanb{}... labelN\ranb{}}
1787\item {\tt )set} {\it label1 \lanb{}... labelN\ranb{} newValue}
1788\end{items}
1789\par\noindent{\bf Command Description:}
1790
1791The {\tt )set} command is used to view or set system variables that
1792control what messages are displayed, the type of output desired, the
1793status of the history facility, the way \Language{} user functions are
1794cached, and so on.
1795Since this collection is very large, we will not discuss them here.
1796Rather, we will show how the facility is used.
1797We urge you to explore the {\tt )set} options to familiarize yourself
1798with how you can modify your \Language{} working environment.
1799There is a \HyperName{} version of this same facility available from the
1800main \HyperName{} menu.
1801Click on \lispmemolink{Settings}{(|htSystemVariables|)} to go to it.
1802
1803The {\tt )set} command is command-driven with a menu display.
1804It is tree-structured.
1805To see all top-level nodes, issue {\tt )set} by itself.
1806\begin{verbatim}
1807)set
1808\end{verbatim}
1809Variables with values have them displayed near the right margin.
1810Subtrees of selections have ``{\tt ...}''
1811displayed in the value field.
1812For example, there are many kinds of messages, so issue
1813{\tt )set message} to see the choices.
1814\begin{verbatim}
1815)set message
1816\end{verbatim}
1817The current setting  for the variable that displays
1818%-% \HDindex{computation timings!displaying}{ugSysCmdsetPage}{B.21.}{)set}
1819whether computation times
1820%-% \HDindex{timings!displaying}{ugSysCmdsetPage}{B.21.}{)set}
1821are displayed is visible in the menu displayed by the last command.
1822To see more information, issue
1823\begin{verbatim}
1824)set message time
1825\end{verbatim}
1826This shows that time printing is on now.
1827To turn it off, issue
1828\begin{verbatim}
1829)set message time off
1830\end{verbatim}
1831%-% \HDsyscmdindex{set message time}{ugSysCmdsetPage}{B.21.}{)set}
1832
1833As noted above, not all settings have so many qualifiers.
1834For example, to change the {\tt )quit} command to being unprotected
1835(that is, you will not be prompted for verification), you need only issue
1836\begin{verbatim}
1837)set quit unprotected
1838\end{verbatim}
1839%-% \HDsyscmdindex{set quit unprotected}{ugSysCmdsetPage}{B.21.}{)set}
1840
1841\par\noindent{\bf Also See:}
1842\downlink{``\ugSysCmdquitTitle''}{ugSysCmdquitPage} in section \ugSysCmdquitNumber
1843
1844
1845\endscroll
1846\autobuttons
1847\end{page}
1848%
1849%
1850\newcommand{\ugSysCmdshowTitle}{)show}
1851\newcommand{\ugSysCmdshowNumber}{B.22.}
1852%
1853% =====================================================================
1854\begin{page}{ugSysCmdshowPage}{B.22. )show}
1855% =====================================================================
1856\beginscroll
1857%-% \HDsyscmdindex{show}{ugSysCmdshowPage}{B.22.}{)show}
1858
1859
1860\par\noindent{\bf User Level Required:} interpreter
1861
1862\par\noindent{\bf Command Syntax:}
1863\begin{items}
1864\item{\tt )show {\it nameOrAbbrev}}
1865\item{\tt )show {\it nameOrAbbrev} )operations}
1866\end{items}
1867
1868\par\noindent{\bf Command Description:}
1869This command displays information about \Language{}
1870domain, package and category {\it constructors}.
1871If no options are given, the {\tt )operations} option is assumed.
1872For example,
1873\begin{verbatim}
1874)show POLY
1875)show POLY )operations
1876)show Polynomial
1877)show Polynomial )operations
1878\end{verbatim}
1879each display basic information about the
1880\spadtype{Polynomial} domain constructor and then provide a
1881listing of operations.
1882Since \spadtype{Polynomial} requires a \spadtype{Ring} (for example,
1883\spadtype{Integer}) as argument, the above commands all refer
1884to a unspecified ring {\tt R}.
1885In the list of operations, \spadSyntax{\$} means
1886\spadtype{Polynomial(R)}.
1887
1888The basic information displayed includes the {\it signature}
1889of the constructor (the name and arguments), the constructor
1890{\it abbreviation}, the {\it exposure status} of the constructor, and the
1891name of the {\it library source file} for the constructor.
1892
1893If operation information about a specific domain is wanted,
1894the full or abbreviated domain name may be used.
1895For example,
1896\begin{verbatim}
1897)show POLY INT
1898)show POLY INT )operations
1899)show Polynomial Integer
1900)show Polynomial Integer )operations
1901\end{verbatim}
1902are among  the combinations that will
1903display the operations exported  by the
1904domain \spadtype{Polynomial(Integer)} (as opposed to the general
1905{\it domain constructor} \spadtype{Polynomial}).
1906
1907\par\noindent{\bf Also See:}
1908\downlink{``\ugSysCmddisplayTitle''}{ugSysCmddisplayPage} in section \ugSysCmddisplayNumber
1909\downlink{``\ugSysCmdsetTitle''}{ugSysCmdsetPage} in section \ugSysCmdsetNumber
1910\downlink{``\ugSysCmdwhatTitle''}{ugSysCmdwhatPage} in section \ugSysCmdwhatNumber
1911
1912
1913\endscroll
1914\autobuttons
1915\end{page}
1916%
1917%
1918\newcommand{\ugSysCmdspoolTitle}{)spool}
1919\newcommand{\ugSysCmdspoolNumber}{B.23.}
1920%
1921% =====================================================================
1922\begin{page}{ugSysCmdspoolPage}{B.23. )spool}
1923% =====================================================================
1924\beginscroll
1925%-% \HDsyscmdindex{spool}{ugSysCmdspoolPage}{B.23.}{)spool}
1926
1927
1928\par\noindent{\bf User Level Required:} interpreter
1929
1930\par\noindent{\bf Command Syntax:}
1931\begin{items}
1932\item{\tt )spool} \lanb{}{\it fileName}\ranb{}
1933\item{\tt )spool}
1934\end{items}
1935
1936\par\noindent{\bf Command Description:}
1937
1938This command is used to save {\it (spool)} all \Language{} input and output
1939%-% \HDindex{file!spool}{ugSysCmdspoolPage}{B.23.}{)spool}
1940into a file, called a {\it spool file.}
1941You can only have one spool file active at a time.
1942To start spool, issue this command with a filename. For example,
1943\begin{verbatim}
1944)spool integrate.out
1945\end{verbatim}
1946To stop spooling, issue {\tt )spool} with no filename.
1947
1948If the filename is qualified with a directory, then the output will
1949be placed in that directory.
1950If no directory information is given, the spool file will be placed in the
1951%-% \HDindex{directory!for spool files}{ugSysCmdspoolPage}{B.23.}{)spool}
1952{\it current directory.}
1953The current directory is the directory from which you started
1954\Language{} or is the directory you specified using the
1955{\tt )cd} command.
1956%-% \HDsyscmdindex{cd}{ugSysCmdspoolPage}{B.23.}{)spool}
1957
1958\par\noindent{\bf Also See:}
1959\downlink{``\ugSysCmdcdTitle''}{ugSysCmdcdPage} in section \ugSysCmdcdNumber
1960
1961
1962\endscroll
1963\autobuttons
1964\end{page}
1965%
1966%
1967\newcommand{\ugSysCmdsynonymTitle}{)synonym}
1968\newcommand{\ugSysCmdsynonymNumber}{B.24.}
1969%
1970% =====================================================================
1971\begin{page}{ugSysCmdsynonymPage}{B.24. )synonym}
1972% =====================================================================
1973\beginscroll
1974%-% \HDsyscmdindex{synonym}{ugSysCmdsynonymPage}{B.24.}{)synonym}
1975
1976
1977\par\noindent{\bf User Level Required:} interpreter
1978
1979\par\noindent{\bf Command Syntax:}
1980\begin{items}
1981\item{\tt )synonym}
1982\item{\tt )synonym} {\it synonym fullCommand}
1983\item{\tt )what synonyms}
1984\end{items}
1985
1986\par\noindent{\bf Command Description:}
1987
1988This command is used to create short synonyms for system command expressions.
1989For example, the following synonyms  might simplify commands you often
1990use.
1991\begin{verbatim}
1992)synonym save         history )save
1993)synonym restore      history )restore
1994)synonym mail         system mail
1995)synonym ls           system ls
1996)synonym fortran      set output fortran
1997\end{verbatim}
1998Once defined, synonyms can be
1999used in place of the longer  command expressions.
2000Thus
2001\begin{verbatim}
2002)fortran on
2003\end{verbatim}
2004is the same as the longer
2005\begin{verbatim}
2006)set fortran output on
2007\end{verbatim}
2008To list all defined synonyms, issue either of
2009\begin{verbatim}
2010)synonyms
2011)what synonyms
2012\end{verbatim}
2013To list, say, all synonyms that contain the substring
2014``{\tt ap}'', issue
2015\begin{verbatim}
2016)what synonyms ap
2017\end{verbatim}
2018
2019\par\noindent{\bf Also See:}
2020\downlink{``\ugSysCmdsetTitle''}{ugSysCmdsetPage} in section \ugSysCmdsetNumber
2021\downlink{``\ugSysCmdwhatTitle''}{ugSysCmdwhatPage} in section \ugSysCmdwhatNumber
2022
2023
2024\endscroll
2025\autobuttons
2026\end{page}
2027%
2028%
2029\newcommand{\ugSysCmdsystemTitle}{)system}
2030\newcommand{\ugSysCmdsystemNumber}{B.25.}
2031%
2032% =====================================================================
2033\begin{page}{ugSysCmdsystemPage}{B.25. )system}
2034% =====================================================================
2035\beginscroll
2036%-% \HDsyscmdindex{system}{ugSysCmdsystemPage}{B.25.}{)system}
2037
2038\par\noindent{\bf User Level Required:} interpreter
2039
2040\par\noindent{\bf Command Syntax:}
2041\begin{items}
2042\item{\tt )system} {\it cmdExpression}
2043\end{items}
2044
2045\par\noindent{\bf Command Description:}
2046
2047This command may be used to issue commands to the operating system while
2048remaining in \Language{}.
2049The {\it cmdExpression} is passed to the operating system for
2050execution.
2051
2052To get an operating system shell, issue, for example,
2053\spadsys{)system sh}.
2054When you enter the key combination,
2055{\bf Ctrl-D}
2056(pressing and holding the
2057{\bf Ctrl} key and then pressing the
2058{\bf D} key)
2059the shell will terminate and you will return to \Language{}.
2060We do not recommend this way of creating a shell because
2061\Lisp{} may field some interrupts instead of the shell.
2062If possible, use a shell running in another window.
2063
2064If you execute programs that misbehave you may not be able to return to
2065\Language{}.
2066If this happens, you may have no other choice than to restart
2067\Language{} and restore the environment via {\tt )history )restore}, if
2068possible.
2069
2070\par\noindent{\bf Also See:}
2071\downlink{``\ugSysCmdbootTitle''}{ugSysCmdbootPage} in section \ugSysCmdbootNumber
2072\downlink{``\ugSysCmdfinTitle''}{ugSysCmdfinPage} in section \ugSysCmdfinNumber
2073\downlink{``\ugSysCmdlispTitle''}{ugSysCmdlispPage} in section \ugSysCmdlispNumber
2074\downlink{``\ugSysCmdpquitTitle''}{ugSysCmdpquitPage} in section \ugSysCmdpquitNumber
2075\downlink{``\ugSysCmdquitTitle''}{ugSysCmdquitPage} in section \ugSysCmdquitNumber
2076
2077
2078\endscroll
2079\autobuttons
2080\end{page}
2081%
2082%
2083\newcommand{\ugSysCmdtraceTitle}{)trace}
2084\newcommand{\ugSysCmdtraceNumber}{B.26.}
2085%
2086% =====================================================================
2087\begin{page}{ugSysCmdtracePage}{B.26. )trace}
2088% =====================================================================
2089\beginscroll
2090%-% \HDsyscmdindex{trace}{ugSysCmdtracePage}{B.26.}{)trace}
2091
2092
2093\par\noindent{\bf User Level Required:} interpreter
2094
2095\par\noindent{\bf Command Syntax:}
2096\begin{items}
2097\item{\tt )trace}
2098\item{\tt )trace )off}
2099
2100\item{\tt )trace} {\it function \lanb{}options\ranb{}}
2101\item{\tt )trace} {\it constructor \lanb{}options\ranb{}}
2102\item{\tt )trace} {\it domainOrPackage \lanb{}options\ranb{}}
2103\end{items}
2104%
2105where options can be one or more of
2106%
2107\begin{items}
2108\item{\tt )after} {\it S-expression}
2109\item{\tt )before} {\it S-expression}
2110\item{\tt )break after}
2111\item{\tt )break before}
2112\item{\tt )cond} {\it S-expression}
2113\item{\tt )count}
2114\item{\tt )count} {\it n}
2115\item{\tt )depth} {\it n}
2116\item{\tt )local} {\it op1 \lanb{}... opN\ranb{}}
2117\item{\tt )nonquietly}
2118\item{\tt )nt}
2119\item{\tt )off}
2120\item{\tt )only} {\it listOfDataToDisplay}
2121\item{\tt )ops}
2122\item{\tt )ops} {\it op1 \lanb{}... opN \ranb{}}
2123\item{\tt )restore}
2124\item{\tt )stats}
2125\item{\tt )stats reset}
2126\item{\tt )timer}
2127\item{\tt )varbreak}
2128\item{\tt )varbreak} {\it var1 \lanb{}... varN \ranb{}}
2129\item{\tt )vars}
2130\item{\tt )vars} {\it var1 \lanb{}... varN \ranb{}}
2131\item{\tt )within} {\it executingFunction}
2132\end{items}
2133
2134\par\noindent{\bf Command Description:}
2135
2136This command is used to trace the execution of functions that make
2137up the \Language{} system, functions defined by users,
2138and functions from the system library.
2139Almost all options are available for each type of function but
2140exceptions will be noted below.
2141
2142To list all functions, constructors, domains and packages that are
2143traced, simply issue
2144\begin{verbatim}
2145)trace
2146\end{verbatim}
2147To untrace everything that is traced, issue
2148\begin{verbatim}
2149)trace )off
2150\end{verbatim}
2151When a function is traced, the default system action is to display
2152the arguments to the function and the return value when the
2153function is exited.
2154Note that if a function is left via an action such as a {\tt THROW}, no
2155return value will be displayed.
2156Also, optimization of tail recursion may decrease the number of
2157times a function is actually invoked and so may cause less trace
2158information to be displayed.
2159Other information can be displayed or collected when a function is
2160traced and this is controlled by the various options.
2161Most options will be of interest only to \Language{} system
2162developers.
2163If a domain or package is traced, the default action is to trace
2164all functions exported.
2165
2166Individual interpreter, lisp or boot
2167functions can be traced by listing their names after
2168{\tt )trace}.
2169Any options that are present must follow the functions to be
2170traced.
2171\begin{verbatim}
2172)trace f
2173\end{verbatim}
2174traces the function {\tt f}.
2175To untrace {\tt f}, issue
2176\begin{verbatim}
2177)trace f )off
2178\end{verbatim}
2179Note that if a function name contains a special character, it will
2180be necessary to escape the character with an underscore
2181%
2182\begin{verbatim}
2183)trace _/D_,1
2184\end{verbatim}
2185%
2186To trace all domains or packages that are or will be created from a particular
2187constructor, give the constructor name or abbreviation after
2188{\tt )trace}.
2189%
2190\begin{verbatim}
2191)trace MATRIX
2192)trace List Integer
2193\end{verbatim}
2194%
2195The first command traces all domains currently instantiated with
2196\spadtype{Matrix}.
2197If additional domains are instantiated with this constructor
2198(for example, if you have used \spadtype{Matrix(Integer)} and
2199\spadtype{Matrix(Float)}), they will be automatically traced.
2200The second command traces \spadtype{List(Integer)}.
2201It is possible to trace individual functions in a domain or
2202package.
2203See the {\tt )ops} option below.
2204
2205The following are the general options for the {\tt )trace}
2206command.
2207
2208%!! system command parser doesn't treat general s-expressions correctly,
2209%!! I recommend not documenting )after )before and )cond
2210\indent{0}
2211\beginitems
2212%\item[{\tt )after} {\it S-expression}]
2213%causes the given \Lisp{} {\it S-expression} to be
2214%executed after exiting the traced function.
2215
2216%\item[{\tt )before} {\it S-expression}]
2217%causes the given \Lisp{} {\it S-expression} to be
2218%executed before entering the traced function.
2219
2220\item[{\tt )break after}]
2221causes a \Lisp{} break loop to be entered after
2222exiting the traced function.
2223
2224\item[{\tt )break before}]
2225causes a \Lisp{} break loop to be entered before
2226entering the traced function.
2227
2228\item[{\tt )break}]
2229is the same as \spadsys{)break before}.
2230
2231%\item[{\tt )cond} {\it S-expression}]
2232%causes trace information to be shown only if the given
2233%\Lisp{} {\it S-expression} evaluates to non-NIL.  For
2234%example, the following command causes the system function
2235%{\tt resolveTT} to be traced but to have the information
2236%displayed only if the value of the variable
2237%{\tt \$reportBottomUpFlag} is non-NIL.
2238%\begin{verbatim}
2239%)trace resolveTT )cond \_\$reportBottomUpFlag}
2240%\end{verbatim}
2241
2242\item[{\tt )count}]
2243causes the system to keep a count of the number of times the
2244traced function is entered.  The total can be displayed with
2245{\tt )trace )stats} and cleared with {\tt )trace )stats reset}.
2246
2247\item[{\tt )count} {\it n}]
2248causes information about the traced function to be displayed for
2249the first {\it n} executions.  After the \eth{\it n} execution, the
2250function is untraced.
2251
2252\item[{\tt )depth} {\it n}]
2253causes trace information to be shown for only {\it n} levels of
2254recursion of the traced function.  The command
2255\begin{verbatim}
2256)trace fib )depth 10
2257\end{verbatim}
2258will cause the display of only 10 levels of trace information for
2259the recursive execution of a user function \userfun{fib}.
2260
2261\item[{\tt )math}]
2262causes the function arguments and return value to be displayed in the
2263\Language{} monospace two-dimensional math format.
2264
2265\item[{\tt )nonquietly}]
2266causes the display of additional messages when a function is
2267traced.
2268
2269\item[{\tt )nt}]
2270This suppresses all normal trace information.  This option is
2271useful if the {\tt )count} or {\tt )timer} options are used and
2272you are interested in the statistics but not the function calling
2273information.
2274
2275\item[{\tt )off}]
2276causes untracing of all or specific functions.  Without an
2277argument, all functions, constructors, domains and packages are
2278untraced.  Otherwise, the given functions and other objects
2279are untraced.  To
2280immediately retrace the untraced functions, issue {\tt )trace
2281)restore}.
2282
2283\item[{\tt )only} {\it listOfDataToDisplay}]
2284causes only specific trace information to be shown.  The items are
2285listed by using the following abbreviations:
2286\indent{0}
2287\beginitems
2288\item[a]        display all arguments
2289\item[v]        display return value
2290\item[1]        display first argument
2291\item[2]        display second argument
2292\item[15]       display the 15th argument, and so on
2293\enditems
2294\indent{0}
2295\enditems
2296\indent{0}
2297\indent{0}
2298\beginitems
2299
2300\item[{\tt )restore}]
2301causes the last untraced functions to be retraced.  If additional
2302options are present, they are added to those previously in effect.
2303
2304\item[{\tt )stats}]
2305causes the display of statistics collected by the use of the
2306{\tt )count} and {\tt )timer} options.
2307
2308\item[{\tt )stats reset}]
2309resets to 0 the statistics collected by the use of the
2310{\tt )count} and {\tt )timer} options.
2311
2312\item[{\tt )timer}]
2313causes the system to keep a count of execution times for the
2314traced function.  The total can be displayed with {\tt )trace
2315)stats} and cleared with {\tt )trace )stats reset}.
2316
2317%!! only for lisp, boot, may not work in any case, recommend removing
2318%\item[{\tt )varbreak}]
2319%causes a \Lisp{} break loop to be entered after
2320%the assignment to any variable in the traced function.
2321
2322\item[{\tt )varbreak} {\it var1 \lanb{}... varN\ranb{}}]
2323causes a \Lisp{} break loop to be entered after
2324the assignment to any of the listed variables in the traced
2325function.
2326
2327\item[{\tt )vars}]
2328causes the display of the value of any variable after it is
2329assigned in the traced function.
2330Note that library code must
2331have been compiled (see \downlink{``\ugSysCmdcompileTitle''}{ugSysCmdcompilePage} in Section \ugSysCmdcompileNumber\ignore{ugSysCmdcompile})
2332using the {\tt )vartrace} option in order
2333to support this option.
2334
2335\item[{\tt )vars} {\it var1 \lanb{}... varN\ranb{}}]
2336causes the display of the value of any of the specified variables
2337after they are assigned in the traced function.
2338Note that library code must
2339have been compiled (see \downlink{``\ugSysCmdcompileTitle''}{ugSysCmdcompilePage} in Section \ugSysCmdcompileNumber\ignore{ugSysCmdcompile})
2340using the {\tt )vartrace} option in order
2341to support this option.
2342
2343\item[{\tt )within} {\it executingFunction}]
2344causes the display of trace information only if the traced
2345function is called when the given {\it executingFunction} is running.
2346\enditems
2347\indent{0}
2348
2349The following are the options for tracing constructors, domains
2350and packages.
2351
2352\indent{0}
2353\beginitems
2354\item[{\tt )local} {\it \lanb{}op1 \lanb{}... opN\ranb{}\ranb{}}]
2355causes local functions of the constructor to be traced.  Note that
2356to untrace an individual local function, you must use the fully
2357qualified internal name, using the escape character
2358\spadSyntax{\_} before the semicolon.
2359\begin{verbatim}
2360)trace FRAC )local
2361)trace FRAC_;cancelGcd )off
2362\end{verbatim}
2363
2364\item[{\tt )ops} {\it op1 \lanb{}... opN\ranb{}}]
2365By default, all operations from a domain or package are traced
2366when the domain or package is traced.  This option allows you to
2367specify that only particular operations should be traced.  The
2368command
2369%
2370\begin{verbatim}
2371)trace Integer )ops min max _+ _-
2372\end{verbatim}
2373%
2374traces four operations from the domain \spadtype{Integer}.  Since
2375{\tt +} and {\tt -} are special
2376characters, it is necessary
2377to escape them with an underscore.
2378\enditems
2379\indent{0}
2380
2381\par\noindent{\bf Also See:}
2382\downlink{``\ugSysCmdbootTitle''}{ugSysCmdbootPage} in section \ugSysCmdbootNumber
2383\downlink{``\ugSysCmdlispTitle''}{ugSysCmdlispPage} in section \ugSysCmdlispNumber
2384\downlink{``\ugSysCmdltraceTitle''}{ugSysCmdltracePage} in section \ugSysCmdltraceNumber
2385
2386\endscroll
2387\autobuttons
2388\end{page}
2389%
2390%
2391\newcommand{\ugSysCmdundoTitle}{)undo}
2392\newcommand{\ugSysCmdundoNumber}{B.27.}
2393%
2394% =====================================================================
2395\begin{page}{ugSysCmdundoPage}{B.27. )undo}
2396% =====================================================================
2397\beginscroll
2398%-% \HDsyscmdindex{undo}{ugSysCmdundoPage}{B.27.}{)undo}
2399
2400
2401\par\noindent{\bf User Level Required:} interpreter
2402
2403\par\noindent{\bf Command Syntax:}
2404\begin{items}
2405\item{\tt )undo}
2406\item{\tt )undo} {\it integer}
2407\item{\tt )undo} {\it integer \lanb{}option\ranb{}}
2408\item{\tt )undo} {\tt )redo}
2409\end{items}
2410%
2411where {\it option} is one of
2412%
2413\begin{items}
2414\item{\tt )after}
2415\item{\tt )before}
2416\end{items}
2417
2418\par\noindent{\bf Command Description:}
2419
2420This command is used to
2421restore the state of the user environment to an earlier
2422point in the interactive session.
2423The argument of an {\tt )undo} is an integer which must designate some
2424step number in the interactive session.
2425
2426\begin{verbatim}
2427)undo n
2428)undo n )after
2429\end{verbatim}
2430These commands return the state of the interactive
2431environment to that immediately after step {\tt n}.
2432If {\tt n} is a positive number, then {\tt n} refers to step number
2433{\tt n}. If {\tt n} is a negative number, it refers to the \eth{\tt n}
2434previous command (that is, undoes the effects of the last \smath{-n}
2435commands).
2436
2437A {\tt )clear all} resets the {\tt )undo} facility.
2438Otherwise, an {\tt )undo} undoes the effect of {\tt )clear} with
2439options {\tt properties}, {\tt value}, and {\tt mode}, and
2440that of a previous {\tt undo}.
2441If any such system commands are given between steps \smath{n} and
2442\smath{n + 1} (\smath{n > 0}), their effect is undone
2443for {\tt )undo m} for any 0 < m <= n.
2444
2445The command {\tt )undo} is equivalent to {\tt )undo -1} (it undoes
2446the effect of the previous user expression).
2447The command {\tt )undo 0} undoes any of the above system commands
2448issued since the last user expression.
2449
2450\begin{verbatim}
2451)undo n )before
2452\end{verbatim}
2453This command returns the state of the interactive
2454environment to that immediately before step {\tt n}.
2455Any {\tt )undo} or {\tt )clear} system commands
2456given before step {\tt n} will not be undone.
2457
2458\begin{verbatim}
2459)undo )redo
2460\end{verbatim}
2461This command reads the file {\tt redo.input}.
2462created by the last {\tt )undo} command.
2463This file consists of all user input lines, excluding those
2464backtracked over due to a previous {\tt )undo}.
2465
2466The command {\tt )history )write} will eliminate the ``undone'' command
2467lines of your program.
2468
2469\par\noindent{\bf Also See:}
2470\downlink{``\ugSysCmdhistoryTitle''}{ugSysCmdhistoryPage} in section \ugSysCmdhistoryNumber
2471
2472\endscroll
2473\autobuttons
2474\end{page}
2475%
2476%
2477\newcommand{\ugSysCmdwhatTitle}{)what}
2478\newcommand{\ugSysCmdwhatNumber}{B.28.}
2479%
2480% =====================================================================
2481\begin{page}{ugSysCmdwhatPage}{B.28. )what}
2482% =====================================================================
2483\beginscroll
2484%-% \HDsyscmdindex{what}{ugSysCmdwhatPage}{B.28.}{)what}
2485
2486
2487\par\noindent{\bf User Level Required:} interpreter
2488
2489\par\noindent{\bf Command Syntax:}
2490\begin{items}
2491\item{\tt )what categories} {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}}
2492\item{\tt )what commands  } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}}
2493\item{\tt )what domains   } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}}
2494\item{\tt )what operations} {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}}
2495\item{\tt )what packages  } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}}
2496\item{\tt )what synonym   } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}}
2497\item{\tt )what things    } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}}
2498\item{\tt )apropos        } {\it pattern1} \lanb{}{\it pattern2 ...\ranb{}}
2499\end{items}
2500
2501\par\noindent{\bf Command Description:}
2502
2503This command is used to display lists of things in the system.  The
2504patterns are all strings and, if present, restrict the contents of the
2505lists.  Only those items that contain one or more of the strings as
2506substrings are displayed.  For example,
2507\begin{verbatim}
2508)what synonym
2509\end{verbatim}
2510displays all command synonyms,
2511\begin{verbatim}
2512)what synonym ver
2513\end{verbatim}
2514displays all command synonyms containing the substring ``{\tt ver}'',
2515\begin{verbatim}
2516)what synonym ver pr
2517\end{verbatim}
2518displays all command synonyms
2519containing the substring  ``{\tt ver}'' or  the substring
2520``{\tt pr}''.
2521Output similar to the following will be displayed
2522\begin{verbatim}
2523---------------- System Command Synonyms -----------------
2524
2525user-defined synonyms satisfying patterns:
2526      ver pr
2527
2528  )apr ........................... )what things
2529  )apropos ....................... )what things
2530  )prompt ........................ )set message prompt
2531  )version ....................... )lisp *yearweek*
2532\end{verbatim}
2533
2534Several other things can be listed with the {\tt )what} command:
2535
2536\indent{0}
2537\beginitems
2538\item[{\tt categories}] displays a list of category constructors.
2539%-% \HDsyscmdindex{what categories}{ugSysCmdwhatPage}{B.28.}{)what}
2540\item[{\tt commands}]  displays a list of  system commands available  at your
2541user-level.
2542%-% \HDsyscmdindex{what commands}{ugSysCmdwhatPage}{B.28.}{)what}
2543Your user-level
2544%-% \HDindex{user-level}{ugSysCmdwhatPage}{B.28.}{)what}
2545is set via the  {\tt )set userlevel} command.
2546%-% \HDsyscmdindex{set userlevel}{ugSysCmdwhatPage}{B.28.}{)what}
2547To get a description of a particular command, such as ``{\tt )what}'', issue
2548{\tt )help what}.
2549\item[{\tt domains}]   displays a list of domain constructors.
2550%-% \HDsyscmdindex{what domains}{ugSysCmdwhatPage}{B.28.}{)what}
2551\item[{\tt operations}] displays a list of operations in  the system library.
2552%-% \HDsyscmdindex{what operations}{ugSysCmdwhatPage}{B.28.}{)what}
2553It  is recommended that you  qualify this command with one or
2554more patterns, as there are thousands of operations available.  For
2555example, say you are looking for functions that involve computation of
2556eigenvalues.  To find their names, try {\tt )what operations eig}.
2557A rather large list of operations  is loaded into the workspace when
2558this command  is first issued.  This  list will be deleted  when you
2559clear the workspace  via {\tt )clear all} or {\tt )clear completely}.
2560It will be re-created if it is needed again.
2561\item[{\tt packages}]  displays a list of package constructors.
2562%-% \HDsyscmdindex{what packages}{ugSysCmdwhatPage}{B.28.}{)what}
2563\item[{\tt synonym}]  lists system command synonyms.
2564%-% \HDsyscmdindex{what synonym}{ugSysCmdwhatPage}{B.28.}{)what}
2565\item[{\tt things}]    displays all  of the  above types for  items containing
2566%-% \HDsyscmdindex{what things}{ugSysCmdwhatPage}{B.28.}{)what}
2567the pattern strings as  substrings.
2568The command synonym  {\tt )apropos} is equivalent to
2569%-% \HDsyscmdindex{apropos}{ugSysCmdwhatPage}{B.28.}{)what}
2570{\tt )what things}.
2571\enditems
2572\indent{0}
2573
2574\par\noindent{\bf Also See:}
2575\downlink{``\ugSysCmddisplayTitle''}{ugSysCmddisplayPage} in section \ugSysCmddisplayNumber
2576\downlink{``\ugSysCmdsetTitle''}{ugSysCmdsetPage} in section \ugSysCmdsetNumber
2577\downlink{``\ugSysCmdshowTitle''}{ugSysCmdshowPage} in section \ugSysCmdshowNumber
2578\endscroll
2579\autobuttons
2580\end{page}
2581%
2582