Boolean Operations
CanParseAsBool()
This function checks whether a numeric or text value (0/1 or "TRUE"/"FALSE") can be interpreted as a Boolean value.
Return type: Boolean
Parameter | Data Type | Description |
|---|---|---|
1* | (variable) | Value to be checked |
Examples
CanParseAsBool("yes") returns FALSE.
CanParseAsBool("False") returns TRUE.
CanParseAsBool(0) and CanParseAsBool("1") returns TRUE.
GetRandomBool()
This function returns a randomly generated Boolean value.
Return type: Boolean
Examples
GetRandomBool() returns TRUE or FALSE.
IsBool()
This function checks whether a value is of the data type "Bool."
Return type: Boolean
Parameter | Data Type | Description |
|---|---|---|
1* | (variable) | Value to be checked |
Examples
IsBool(FALSE) returns TRUE.
IsBool("TRUE") returns FALSE.
ParseAsBool()
This function converts a numeric value or a text value (0/1 or "TRUE"/"FALSE") into a Boolean value.
Return type: Boolean
Parameter | Data Type | Description |
|---|---|---|
1* | Text | Value to be converted |
Examples
ParseAsBool(0) returns FALSE.
ParseAsBool("True") returns TRUE.