-
Notifications
You must be signed in to change notification settings - Fork 2
_boolean
bergsma edited this page Sep 26, 2014
·
5 revisions
#boolean
###Create or convert a variable or value into a boolean format
Syntax
result = boolean value ;
boolean variable [= value] ;
Arguments
- list value
A value of any type.
Return Value
boolean result
- 0 - 1 : A boolean value is 1 byte. It is displayed as a 0 or 1. All strings convert to a value of 0x01 except when the string begins with a "%", then the boolean value is 0x00.
The STATUS variable is set to $ACKNOWLEDGE
When the argument is an array variable, all the elements in the array are converted, and the result will be a vector array boolean result
- 0 - 1 : A boolean value is 1 byte. It is displayed as a 0 or 1. All strings convert to a value of 0x01 except when the string begins with a "%", then the boolean value is 0x00.
The STATUS variable is set to $ACKNOWLEDGE
When the argument is an array variable, all the elements in the array are converted, and the result will be a vector array
Exceptions
-
%ARGUMENT: Invalid arguments. Usage: boolean variable [= value] ;
-
%IDENTIFIER: 'variable' argument is not a valid identifier, literal, or reference
Description
None
Examples
put boolean { 0, 1, 2.3, "$ACK", "%FAIL" } ;
boolean a = "$ACK" ;
put a ;
Related Links