Using the LISP Interpreter
The LISP interpreter on the Suns is like any other program with
a command line interface. A small number of commands is enough
to make it work. The following should be sufficient for what we
are doing:
- Starting the interpreter -- simply type "lisp".
- Quitting the interpreter -- everything you need to do from
inside the interpreter is a function call; so to quit type "(quit)".
- What to do when you make an error -- LISP has extensive debugging
facilities. However, we are not going to spend time learning them.
If you make an error, LISP will give you some options. Chose the
one that says "[ABORT] Return to Top Level." (type the number
of that option which is usually but not always "0"). This will put you back where you were before
you made the mistake. Then figure out what the error is by thinking
about the LISP code you wrote.
- How do you edit from inside LISP -- You don't. Exit LISP and
edit outside if you need to.
- How do I get the file I just edited back into LISP -- two
ways:
- Cut and paste what you have just done into a window running
LISP. This requires that you be using a windowing system but is
the easiest.
- Read in an external file with LISP function(s) in it from
outside using the LISP command "(load "filename")"
where "filename" is the name of the file with the LISP
function(s) in it. The quotes around the filename are required.
This requires that you edit the LISP functions outside the interpreter.
- How do I learn more about LISP -- If you want to learn more about LISP than
is in our book, you should buy a book. I can recommend a couple. If you want
to know more about our particular implementation, try:
- Do a "man lisp" for the man page.
- If you really feel adventuresome, try the infotool. Type "info";
do the tutorial to learn how to use the infotool; then explore the material on LISP.