Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.

  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}
	wish: if {$foo == {bar}} {puts stdout bar}

always in expressions, depending on if you want expansion performed or

Contributed by "Jesper Blommaskog"