Hi Thorsten,

> I wonder how I can use local variable X inside of the 'glue' argument list:
> 
> ,----
> | : (let X (+ 3 4) X)
> | -> 7
> | 
> | : (let X (+ 3 4) (glue " " '("Number"  X `(- 4 9))))
> | -> "Number X -5"
> | 
> | : (let X (+ 3 4) (glue " " '("Number"  `X `(- 4 9))))
> | -> "Number  -5"
> `----
> 
> X does not seem defined in the last expression although its surrounded
> by (let X (+ 3 4) ...). 

Hmm, read-macros seem indeed a lot misunderstood. NEVER use a read-macro
to insert values which are defined at *run*time! As the name says, they
are evaulated at *read* time!


You could do this:

   : (let X (+ 3 4) (glue " " (list "Number"  X `(- 4 9))))

(the second read-macro is OK, as the (- 4 9) may be evaluated at
read-time)

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to