asBoolean
Converts a reserved-list value to a Boolean true or false.
A complete list of reserved-list values is provided here.
For all other values, the function returns an error message.
Parameters
X (any)
The value to convert.
Reserved-list values for asBoolean
Value | Data Type | Converts To |
---|---|---|
'True' | string | true |
'true' | string | true |
'T' | string | true |
't' | string | true |
'Yes' | string | true |
'Y' | string | true |
'y' | string | true |
1 | number | true |
'1' | numeric string | true |
'False' | string | false |
'false' | string | false |
'F' | string | false |
'f' | string | false |
'No' | string | false |
'n' | string | false |
0 | number | false |
'0' | numeric string | false |
" " (double-quoted empty string) | string | false |
Examples
ATL in Script | Result |
---|---|
| false |
| true |
| false |
| true |
| true |
| false |