From: Stephen D. <sd...@gm...> - 2007-11-28 19:14:49
|
On Nov 28, 2007 5:46 PM, Vasiljevic Zoran <zv...@ar...> wrote: > > On Nov 28, 2007, at 6:22 PM, Stephen Deasey wrote: > > > Pre-change: > > > > > > % expr !1 > > 0 > > % expr !0 > > 1 > > > > % expr !true > > 0 > > % expr !yes > > 0 > > % expr !y > > 0 > > > set value [ns_config -bool /missing/section missing_parameter true] > if {$value == 1} { > puts "$value is true" > } else { > puts "$value is false" > } {$bool == 1} is not a valid test of truthiness. And it's uneccessary: set bool 1 if {$bool} { puts yup } set bool yes if {$bool} { puts $yup } |