Null object: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 513:
if ![info exists arr(nullval)] ...
if ![dict exists $dic nullval] ...</lang>
You can algoalso use this condition inside an if statement to check if the variable $value is set or not:
<lang Tcl>[expr {([string compare "$value[puts \"\"]" ""]==1)}]</lang>
I think this is the better way to achieve it. In this case, if $value is set, returns true, or else returns false.
Anonymous user