Page 1 of 1

values into mul

Posted: Fri Oct 11, 2019 11:08 pm
by joejoe
Hi,

I am trying this:

Code: Select all

(set 'abc "8888")
(println abc)
(println (mul 2 abc))
and getting this:

Code: Select all

8888

ERR: value expected in function mul : abc
What would be the way to get values into the mul function?

Thanks!

Re: values into mul

Posted: Fri Oct 11, 2019 11:40 pm
by rickyboy
Use read-expr.

Code: Select all

(println (mul 2 (read-expr abc)))

Re: values into mul

Posted: Fri Oct 11, 2019 11:46 pm
by joejoe
rickyboy,

You're the man, thanks big!

I hadn't gotten so far as the read-expr, much appreciated! =)