Class Bool
Represents booleans as objects. True/false.
Variables of this type are commonly used in comparisons and conditional statements.Constructors
Bool()
Default constructor.
Declaration
Bool Bool()
Bool(Bool)
Pass a boolean value to copy into a new object.
Declaration
Bool Bool(Bool value)
Examples
Bool isWellFormed = true;
Bool isValid = Bool(isWellFormed);
Bool isCertified = Bool(false);
Methods
toInteger()
Converts a boolean value to its integer representation (0 or 1).
Declaration
Integer toInteger()
Returns
Type | Description |
Integer | False equals 0; true equals 1. |
toString()
Converts a boolean value to its string representation ("true" or "false").
Declaration
String toString()
Examples
Bool b = true;
printLine(b.toString());
Returns
Type | Description |
String | "true" or "false" |