From: Vasiljevic Z. <zv...@ar...> - 2007-11-29 07:40:46
|
On Nov 29, 2007, at 8:10 AM, Stephen Deasey wrote: > It was returning a boolean value, guaranteed. It used Tcl_GetBoolean > to parse the value from the config file, and Tcl_GetBooleanFromObj to > check the default value. If both of those calls return TCL_OK, then > whatever comes out the other side is a valid boolean value. What about: puts "[expr {0 == 0}]" What is this going to return in your tclsh? Is it going to say true or t or yes ? NO. It is printing: 1 It will NEVER print anything else. Hence you cannot test string equality for expressions with "false"/"no" etc but you CAN test it with numerical value of 0 (zero) or non-zero. Allright? |