You can enter s-expressions at the > prompt, and you will see the results of evaluating them. To load a LISP program from a file, enter:
This is useful if your program is of any length, as it can save a lot of retyping. Note that gcl expects your filename to be in all capital letters. There really isn't a good reason for this, but you will get an aggravating error message if you try to load a file which has been named with lower case letters.
If you do encounter an error message and see the error prompt >>, you can usually bounce back to the top level prompt by entering:
Then you can try again. Because learning a full LISP environment is beyond the scope of this class, it is suggested that mistakes be corrected in the program file. Just reload the program file when you have finished making corrections.
One useful feature of the LISP environment, especially for following recursion, is the trace. To use it, enter:
where function-name is the name of a function you have defined using defun and loaded into gcl. Then run the function, as usual:
to follow its operation. To run the function in normal mode, after the trace, either reload it, or enter:
To exit LISP, enter: