The Listener tool interactively evaluates the Lisp forms you enter. During a typical session, you evaluate a form in the Listener, then examine the effects in other tools, returning to the Listener whenever you want to evaluate another form. The structure of this tutorial reflects this two-stage approach.
Except on Unix platforms, a Listener is created when you start the LispWorks IDE. If you don't currently have a Listener (check the Windows menu), start one by choosing Tools > Listener from the podium or clicking on in the Podium. This section of the tutorial demonstrates some of its more useful features. A Listener window is shown in Listener below.
The Listener contains two views: the Listener view and the output view. At the bottom of the Listener is an echo area that is visible in either view. The echo area is used to prompt you for information when performing editor commands such as searching for text. You can switch between the two views by clicking the
Listener
and
Output
tabs respectively. You can evaluate Lisp forms in the Listener view by typing the form, followed by Return
. Any output that is produced is displayed in the Listener view.
Return
.
(+ 1 2)
The result of the evaluation, 3, appears in the Listener, and a new prompt is printed. Notice that the number in the prompt has been incremented, indicating that a form has been evaluated.
Because you may want to enter a number of very similar forms, commands are provided which make this easy.
Meta+P
.
The form that you just evaluated is printed at the new prompt. You can press Return
to evaluate this form again, or, more usefully, you can edit the form slightly before evaluating it.
Ctrl+B
to move the cursor back one space. Now press the Backspace
key to delete the number 2
, and type 3
in its place.
You have edited the form (+ 1 2)
to create a new form, (+ 1 3)
.
Return
to evaluate the new form.The result of the evaluation, 4, appears in the Listener, followed by another new prompt, with the prompt number incremented once again.
LispWorks IDE User Guide (Unix version) - 13 Sep 2017