Class std::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.
Operations
- boolean == x (Boolean == Object ⇒ Boolean)
- A boolean is equal only to itself.
- not boolean (not Boolean ⇒ Boolean)
- Return the boolean negation of the value.
- b1 and b2 (Boolean and Boolean ⇒ Boolean)
- Return the boolean and of the booleans b1 and b2. The right operand expression if evaluated only if b1 evaluates to True.
- b1 or b2 (Boolean or Boolean ⇒ Boolean)
- Return the boolean or of the booleans b1 and b2. The right operand expression is evaluated only if b1 evaluates to False.
- Str(boolean)
- Return the string "True" or "False".