[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

An interesting puzzle, or bug in CLISP?

>>>>> "Mark" == M Thomas <thommark@access.digex.net> writes:

Mark> Now suppose I modify the PRINT-OBJECT method very slightly,
Mark> replacing the format directive `~C' by the format directive
Mark> `~A'. The result is a file I'll call `bad.lsp'.

I don't get this ~C/~A problem with 1995-06-23.  I see it quoted
in the .fas file.

Mark> The punch line is that the _interpreted_ versions `good.lsp' and
Mark> `bad.lsp' both work, but the _compiled_ version `bad.fas' is
Mark> incorrect.  Apparently the Lisp constant object denoted by !(a b
Mark> c) in the source code `bad.lsp' is stored incorrectly in
Mark> `bad.fas', resulting in the following misbehavior:

For me, your '!(a b c) example doesn't compile without errors.
Would something like this do what you want?

 #'(lambda (s c)
     `(make-instance 'foo :char ,c :form ',(read s T NIL T))