On Nov 28, 2007 5:46 PM, Vasiljevic Zoran <[EMAIL PROTECTED]> 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
}

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to