This seems like really strange behavior for me in Tcl, or is this normal and I just don't understand how comments work?
This code runs just fine in Tcl:
#foreach corner {1 2} {
#if { $a } {
#}
OK, nothing is actually running, but I get no error. But if I comment out the loop command, then the comment line inside the loop causes an error:
foreach corner {1 2} {
#if { $a } {
}
The Tcl interpreter (tclsh) says:
missing close-brace: possible unbalanced brace in comment
while executing
"foreach corner {1 2} {"
(file "test.tcl" line 1)
Just for completeness, I should mention that when I delete that commented line, the error goes away.
Is that normal? Is there a better way to "comment out" lines while developing code? How can I make the interpreter completely ignore content in comments?