Re: '(1 2 3) => ;;; An error occurred...

JP Massar <[email protected]>
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
At 02:51 PM 3/18/03 -0800, you wrote:
>'(1 2 3)
>;;; An error occurred in function COMPILE-FORM:
>;;; Error: Cannot compile form: (1 2 3)
>;;; Entering Corman Lisp debug loop......
>
>'(list 1 2 3) => (1 2 3)
>
>(quote (1 2 3)) => (1 2 3)

You are using the IDE.

If you just use the CLCONSOLE.EXE this will work.

The problem is that the IDE tries to figure out the form to
be evaluated by (I think) reading backwards.  In your first
example once it gets to the left paren (by reading backwards)
it stops -- it never sees the QUOTE mark.  Then it tries to
evaluate/compile (1 2 3) and it cannot.

Same thing for your 2nd example, the IDE is not feeding the
QUOTE mark to Lisp.

The third works just fine.  The entire form is passed to Lisp and
the result of the evaluation is returned.

There are numerous gotchas of this ilk using the IDE.  You simply
have to be careful.  For instance

(setq x #\()

doesn't work (returns NIL, and X is never set)

Occasionally the IDE will seem to hang because it thinks it is still
inside a string but you know better (hah!).  You have to type a DOUBLE-QUOTE
char and then SHIFT-ENTER to unfreeze it.

Hope this helps.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.