[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string to symbol, how?
- To: info-mcl@digitool.com
- Subject: Re: string to symbol, how?
- From: kanderso@bitburg.bbn.com (Ken Anderson)
- Date: 11 May 95 12:05:35
- Organization: BBN, Cambridge MA
- References: <3ocrgq$7in@waage.rz.uni-ulm.de>
- Sender: owner-info-mcl@digitool.com
In article <Doug_Merrill-0705950956300001@dmerrill.rand.org> Doug_Merrill@rand.org (Douglas C. Merrill) writes:
In article <poeck-0605951244570001@wi6a65.informatik.uni-wuerzburg.de>,
poeck@informatik.uni-wuerzburg.de (Karsten Poeck) wrote:
> In article <3ocrgq$7in@waage.rz.uni-ulm.de>, stede@faw.uni-ulm.de (Manfred
> Stede) wrote:
>
> > it: can someone tell me how to convert a string to a symbol?
>
> (intern (string-upcase "The string") (find-package :your-favorite-package))
>
> Karsten A. Poeck, Lehrstuhl fuer Informatik VI, Universitaet Wuerzburg
The only problem with using intern rather than read-from-string is that
your final symbol is sensitive to the print-case you happen to have set.
Read-from-string doesn't behave this way, but does return multiple-values
(if for some strange reason you care about that).
Yes, but read-from-string is a Big Hammer which is pretty costly to use and
may do more than you want.
k
--
Ken Anderson
Internet: kanderson@bbn.com
BBN ST Work Phone: 617-873-3160
10 Moulton St. Home Phone: 617-643-0157
Mail Stop 6/4a FAX: 617-873-2794
Cambridge MA 02138
USA