Note that I cannot comment on the “information exists” above;
I often use this form.
if { [info exists pie] && [$pie == "ThisIsWhatIWantInPie"]} {
puts "I found what I wanted in pie."
} else {
puts "Pie did not exist; but I still did not error,TCL evaluation \
will see the conditional failed on the [info exists] and not \
continue onto the comparison."
}
source
share