Reputation: 1493
I am trying to execute in tclsh the following code :
set t 2
if { $t > 0 || $t < 30 || $t < 20 } { puts yes }
In a tclsh shell, I get the following error :
syntax error in expression " $t > 0 || $t < 30 || $t < 20 ": character not legal in expressions
What is the character that is not legal here ? I suspected '<' to be the problem but then I ran this command :
if { $t > 0 } { puts yes }
and I got 'yes' printed as expected.
Upvotes: 0
Views: 54
Reputation: 137627
All visible characters appear legal. It's probably some sort of invisible space or something like that; Tcl 8.4 basically only really handled ASCII correctly in expressions (outside of quoted constants).
Upvotes: 0