@head
@module std
@title Class std::Boolean
@index Boolean
The class Boolean has only two instances, the objects
True and False.
These are the only values
returned by boolean operations such as == and not. Boolean
values are used as conditions in if statements and loops.
@class Boolean
@desc The Boolean type. This type object cannot be used to create
instances of the type.
@end
Operations
@op boolean == x @optype{Boolean == Object -> Boolean}
@desc A boolean is equal only to itself.
@end
@op not boolean @optype{not Boolean -> Boolean}
@desc Return the boolean negation of the value.
@end
@op b1 and b2 @optype{Boolean and Boolean -> Boolean}
@desc Return the boolean and of the booleans b1 and
b2. The right
operand expression if evaluated only if b1 evaluates to
True.
@end
@op b1 or b2 @optype{Boolean or Boolean -> Boolean}
@desc Return the boolean or of the booleans b1 and
b2. The right operand
expression is evaluated only if b1 evaluates to False.
@end
@op Str(boolean)
@desc Return the string "True" or "False".
@end