[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: Doug_Merrill@rand.org (Douglas C. Merrill)
- Date: Sun, 07 May 1995 09:56:30 -0700
- Organization: RAND
- References: <3ocrgq$7in@waage.rz.uni-ulm.de>, <poeck-0605951244570001@wi6a65.informatik.uni-wuerzburg.de>
- Sender: owner-info-mcl@digitool.com
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).
Peace,
Douglas Merrill
--
Douglas C. Merrill
RAND
1700 Main Street
P.O. Box 2138
Santa Monica CA 90407-2138
(310) 393-0411, x7876
Doug_Merrill@rand.org