Re: request for change of boolean

new topic     » goto parent     » topic index » view thread      » older message » newer message

CChris wrote:
> 
> 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.

<interesting stuff snipped>

> Again, while the above two scenarios would make coding safer and clearer, they
> just don't fit in what Eu is. If I ever can get a corret type system to work
> in Æ 

What is "Æ" ?

> - not for the near future -, then the nil solution will be used.


I liked the way bool and bytebool worked and evaluated in Pascal. Rather like
common sense, or a checkbook. If the value was positive, any value, then it was
there, money was in the checkbook, it was TRUE. If it was negative or zero, it
was not there, there was no money, and it evaluated to FALSE. Somehow, it makes
sense to me that Eu would have extended that to sequences (so {0,0,0,-300} =
false, while {0,0,5000,0} is true). In reality, it seems to be not only flamebait
on my butt, but a great example of why it's a good idea to NOT provide specific
code to illustrate a point.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu