Contents    Page-10    Prev    Next    Page+10    Index   

Lisp Interaction

The Lisp Interpreter interacts with the user:

  1. Read an expression from the terminal.

  2. Evaluate the expression to determine its value.

  3. Print the value; go to step 1.
This is sometimes called the read-eval-print loop.

The interpreter prints a prompt, which is > in GCL [Gnu Common Lisp. Originally developed at the University of Kyoto as Kyoto Common Lisp or KCL, it was enhanced by Prof. Bill Schelter at UT to become Austin Kyoto Common Lisp or AKCL, later renamed GCL. To exit GCL, enter (bye). To get out of an error break, enter :q or :h for help.].


   % gcl
   >57
   57

   >(+ 32 57)
   89

   >(+ (* 8 4) (- 60 3))
   89

   >(sqrt 2)
   1.4142135623730951