scope problem
Posted: Sat Sep 18, 2010 10:35 am
Hello.
I'm facing a strange scope problem: simply put...
(defun bar(expr x v)
(setf result expr)
(setf x v)
(eval result)
)
> (bar '(* x 2) 'x 10)
Error in KERNEL::UNBOUND-SYMBOL-ERROR-HANDLER: the variable X is unbound.
[Condition of type UNBOUND-VARIABLE]
-------------------------------------------------------------------------------------------------
but when i type the same commands on system the result comes...but actually i want to implement this in a function for my code
I'm facing a strange scope problem: simply put...
(defun bar(expr x v)
(setf result expr)
(setf x v)
(eval result)
)
> (bar '(* x 2) 'x 10)
Error in KERNEL::UNBOUND-SYMBOL-ERROR-HANDLER: the variable X is unbound.
[Condition of type UNBOUND-VARIABLE]
-------------------------------------------------------------------------------------------------
but when i type the same commands on system the result comes...but actually i want to implement this in a function for my code