[BUG] ?? in True and False

Bill Spight bspight at pacbell.net
Thu Mar 13 19:53:05 UTC 2003


All:

    true | 10 -> true
    true & 10 -> 10
    false | 10 -> 10
    false & 10 -> false

The Class Reference says:

> & aBoolean
>  Evaluating conjunction (AND). Evaluate the argument. Then answer true if both the receiver and the argument are true.
>   
>  
> | aBoolean
>  Evaluating disjunction (OR). Evaluate the argument. Then answer true if either the receiver or the argument is true.
>  

There is, if not a requirement that the argument be a Boolean, at least
that strong suggestion. Nowhere does it say to return a non-Boolean. As
long as we're evaluating the argument, we might as well check whether it
is a Boolean or not, no?

Best,

Bill



More information about the Squeak-dev mailing list