[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A variable that holds a string which may be the name of a variable.
From: |
Richard Shann |
Subject: |
A variable that holds a string which may be the name of a variable. |
Date: |
Wed, 02 Dec 2009 19:22:07 +0000 |
I am stuck on one of those symbol/variable-name-in-a-string things
again:
(define mything "display")
(display (eval-string mything))
that's fine. But can I test that the string in mything is the name of a
variable before doing the eval-string and finding out the hard way? I've
been doing (symbol? mything) etc, and going witless. Do I have to do all
that catch stuff?
The situation is that I can guess (programmatically construct that is)
the name of the variable, but it may not be defined. If it isn't I will
just say so, but if it is I want the string it is defined to hold.
Any help much appreciated!
Richard Shann