我有一个变量是否存在取决于我的输入,所以我做了一个 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"
有什么错误?