(read-from-string "(3 4)")
- Better make sure *read-eval* is nil, if your data comes from an
untrusted source.
--
> Hello,
> I am rather new in lisp, and I have a next question:
> How can I convert "(3 4)" to list?
Check out the function `read-from-string'
cl-prompt> (read-from-string "(3 4)")
(3 4)
5
Note that the function returns 2 values: (1) the object read and (2)
"the index of the first character in the bounded string that was not
read." (from the ANSI spec).
Cheers
--
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488
715 Broadway 10th Floor fax +1 - 212 - 995 4122
New York, NY 10003, USA http://bioinformatics.cat.nyu.edu
"Hello New York! We'll do what we can!"
Bill Murray in `Ghostbusters'.
(read-from-string "(3 4)")
For more info, like how to trap errors, see:
http://www.lispworks.com/reference/HyperSpec/Body/f_rd_fro.htm