I am learning Tcl to automate a test bench. puts "Value is $x" prints the value, puts {Value is $x} prints the text $x literally, and if {$x > 5} {...} uses braces but still sees the value. A loop I wrote as while "$i < 10" { incr i } never terminates.
What are the actual rules for braces, quotes and brackets, and why does if behave differently from puts with the same braces?




