immutable class BOOL < $STR, $IS_EQ, $FMT
****
BOOL objects represent boolean values and are either equal to `true' or `false'. The boolean operators `and' and `or' are part of the Sather language. This class defines several additional operators.


Ancestors
$FMT $IS_EQ $STR



Public


Features
and_not(b:SAME):SAME
**** Computes self and the complement of `b'.
and_rout(b:SAME):SAME
**** A routine version of "self and `b'". (Useful for making bound routines.)
fmt( f: STR ):STR
from_str(s:STR):SAME
implies(b:SAME):SAME
**** True iff self implies `b'. Same as "nand_not".
int:INT
**** 0 for false, 1 for true
is_eq(b:SAME):SAME
**** True if self and `b' have the same value (same as "xnor").
is_eq(arg: $OB): BOOL
**** Overloaded version of the is_eq routine that works with an argument of any type. If the type of the 'arg' is not the same as they type of 'self' then return false. Otherwise, deletegate to the 'real' is_eq(SAME):BOOL routine
nand(b:SAME):SAME
**** The complement of self anded with `b'.
nand_not(b:SAME):SAME
**** Computes self nand the complement of `b'. This is the same as the complement of self or `b'.
nor(b:SAME):SAME
**** The complement of self ored with `b'.
nor_not(b:SAME):SAME
**** Computes self nor the complement of `b'. This is the same as the complement of self and `b'.
not:SAME
**** The complement of self. if self then return false else return true end
or_not(b:SAME):SAME
**** Computes self or the complement of `b'.
or_rout(b:SAME):SAME
**** A routine version of "self or `b'". (Useful for making bound routines.)
str:STR
**** The string representation of self.
xnor(b:SAME):SAME
**** True if self and `b' have the same value (same as "is_eq").
xor(b:SAME):SAME
**** Self exclusive ored with `b'. Same as "/=".

The Sather Home Page