MastroLube Posted November 5, 2015 Share Posted November 5, 2015 Hello guys, I've a simple question for you I need to covert a string to a variable name. (nth i (strcat "I_" pippo)) where pippo is "100" and I_100 is the name of a list Thank GOT THE ANSWER ) (nth i (eval (read (strcat "I_" pippo)))) Quote Link to comment Share on other sites More sharing options...
David Bethel Posted November 5, 2015 Share Posted November 5, 2015 If you are binding the variable, remember to use (set) in lieu of (setq) (set (read (strcat "I_" pippo))) Have Fun ! -David Quote Link to comment Share on other sites More sharing options...
MastroLube Posted November 5, 2015 Author Share Posted November 5, 2015 thanks! now I know the difference between setq and set ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.