get quoted strings to work the way I want?
|
|
You may have written something like
wish: set foo bar
wish: if {$foo == bar} {puts stdout bar}
syntax error in expression "$foo == bar"
in which bar is interpreted as neither a string nor a variable, since
strings as operands in expressions MUST be surrounded by double quotes
or braces.
Change to
wish: if {$foo == "bar"} {puts stdout bar}
or
wish: if {$foo == {bar}} {puts stdout bar}
always in expressions, depending on if you want expansion performed or
not.
Contributed by "Jesper Blommaskog"
|
|
|