Re: request for change of boolean
- Posted by c.k.lester <euphoric at ck?est?r.com> Dec 06, 2007
- 840 views
Kat wrote: > > Is it possible to change how boolean expressions are evaluated such that only > values greater than 0 pass this test? : > > }}} <eucode> > readfile = open(flagfilename,"r") > if readfile then > -- it's there, process it > end if > </eucode> {{{ > > Currently, if readfile = -1 , it evaluates to TRUE, when in fact the readfile > was not opened. I agree with this. I have counted on positive values being TRUE and values <= 0 as being FALSE. It has bit me before. Yes, it's simple to fix, but if we are treating the value as boolean...