How do you convert a string to a list for evaluation or quoting ?
"(defun foo (x) (+ x x))" -> (defun foo (x) (+ x x))
OR
"(a b c)" -> '(a b c)
I am working in Allegro CL for Windows. Any help would be
greatly appreciated.
Thanks, Ben
(······@netcom.com)
[Ben Larner]
| How do you convert a string to a list for evaluation or quoting?
`read' is the fundamental function for this. see `read-from-string'.
#\Erik
--
main () { printf ("%d\n", sin ("foo")); }
······@sybase.com wrote about
"Strings to Lists ???":
> How do you convert a string to a list for evaluation or quoting ?
>
> "(defun foo (x) (+ x x))" -> (defun foo (x) (+ x x))
>
> OR
>
> "(a b c)" -> '(a b c)
>
>
> I am working in Allegro CL for Windows. Any help would be
> greatly appreciated.
>
> Thanks, Ben
> (······@netcom.com)
>
(setq x (read-from-string "(a b c)"))
.
Dieter