Show / Hide Table of Contents

Class Bool

Represents booleans as objects. True/false.

Variables of this type are commonly used in comparisons and conditional statements.
Syntax

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()
Returns
Type Description
String

"true" or "false"

Examples

Bool b = true;
printLine(b.toString());
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top