game-read function not react.SYSTEM::READ-EVAL-PRINT: variable WALK has no value

42 views
Skip to first unread message

Michael Holz

unread,
Oct 12, 2020, 4:37:36 PM10/12/20
to Land of Lisp

Hello to all.

don't understand this behavior.
In CLISP 2.49.92 (2018-02-18)


[1]> (defun game-read ()
       (let ((cmd (read-from-string (concatenate 'string "(" (read-line) ")"))))
            (flet ((quote-it (x)
                       (list 'quote x)))
                (cons (car cmd) (mapcar #'quote-it (cdr cmd))))))
]
GAME-READ
[2]> (game-read)walk east
(NIL)                                                                                             
[3]>                                                                                              
*** - SYSTEM::READ-EVAL-PRINT: variable WALK has no value                                         
The following restarts are available:                                                             
USE-VALUE      :R1      Input a value to be used instead of EINS.                                 
STORE-VALUE    :R2      Input a new value for EINS.
ABORT          :R3      Abort main loop
Break 1 [4]>

I'm pretty shure there is sqmething easy to solve my problem, but can't figured it out by my self.

Greetings,

Michael
Reply all
Reply to author
Forward
0 new messages