[plt-scheme] Dealing with string->symbol

From: Pierre CHATEL (addicted2 at wanadoo.fr)
Date: Wed Aug 14 05:28:11 EDT 2002

Hi,

    I'm kinda new to the scheme scene and have a newbie question: How to
deal correctly with the (string->symbol "xxx") procedure?
    In fact, i'm trying to convert some text read from a text-field object
to a lambda in order to make some algebra on it. Like:
    input: "(sin x)"
    output: (eval (list 'lambda '(x) (string->symbol input)))
but it seems not to work !
(string->symbol 'a) is giving "a"
but (string->symbol "(sin x)") outputs |(sin x)|  ?!

How can i deal with that?

Thxs,
Pierre




Posted on the users mailing list.