【发布时间】:2012-08-29 13:39:46
【问题描述】:
我有一个变量是否存在取决于我的输入 所以我做了一个if:
if { [info exists $var1] } {
puts "Here we are, Born to be kings, We're the princes of the universe ..."
}
但是当我启动我的脚本时,我得到了错误日志:
can't read "var1": no such variable
while executing
"info exists $var1"
哪里错了?
【问题讨论】:
标签: tcl