将字符串转换为变量
大家好,我有一个简单的问题要问你们我需要将字符串转换为变量名。
(nth i (strcat "I_" pippo))
其中pippo为“100”
I_100是一个列表的名称
感谢
(得到答案)
(nth i (eval (read (strcat "I_" pippo)))) 如果要绑定变量,请记住使用(set)代替(setq)
(set (read (strcat "I_" pippo)))
玩得开心-大卫 谢谢现在我知道了setq和set之间的区别)
页:
[1]