BOOLEAN
10.6
The BOOLEAN declare a decimal numeric variable that is a FORM with a size of one byte that only contains a zero (FALSE) or a one (TRUE). The BOOLEAN definition uses one of the following formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Data Definition Label.
%
Optional. Denotes the item as being GLOBAL.
%%
Optional. Denotes the item as GLOBAL but does not initialize it in any way.
*
Optional. Denotes the item or file as being COMMON.
FALSE
Optional. A keyword named 'FALSE' indicating a BOOLEAN value of' zero.
TRUE
Optional. A keyword named 'TRUE' indicating a BOOLEAN value of one.
arraysize
Optional. An integer decimal constant, CONST variable or EQUATEd value indicating the number of array items.
^
Optional. Denotes the item as being a POINTER.
Flags Affected: NONE
Note the following:
When a format includes the FALSE or TRUE keyword, the BOOLEAN is initialized to a zero or one value appropriately. If the format does not include TRUE or FALSE, the default value is zero indicating FALSE.
The BOOLEAN variable has the same UDA format and behavior of a FORM variable with a size of one whole decimal digit. However, the BOOLEAN only contains a zero or one decimal value.
Any PL/B instruction that attempts to move, add or sub only stores either a zero or one in a BOOLEAN variable.
The BOOLEAN variable causes a compiler error when it is used in these PL/B instructions:
See Also: Numeric Variables, Data Definitions
![]() |