[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
string > symbol?
- To: MCL <info-mcl@digitool.com>
- Subject: string > symbol?
- From: Ken Tilton <71460.744@compuserve.com>
- Date: 17 Mar 95 10:43:28 EST
- Sender: owner-info-mcl@digitool.com
We keep running into the need to make a string into a symbol, but things are
not going well.
"intern" is not really working for us, but I gather that is the way to go.
here's the scoop.
Suppose we have a string we wish to parameterize: 'Hi, I'm #name#". We want to
take the bit between #s and treat it as a slot accessor:
(expand a-string a-target), which would lead to (at some point):
(funcall (string-to-symbol (stuff-between #\# a-string)) a-target)
which would be in this case the same as (name a-target).
But this don't work. Intern is advertised in CLtL as converting a string to a
symbol, but I note the returned value is |NAME|, not "name".
Is there a way to do what we are trying, or am I just taking a non-Lisp
approach to a problem?
Cheers, Ken