HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
3- 28
numeric constant of short integer type equal to zero. Depending on the
operator, HP Business BASIC/XL evaluates a Boolean expression either
completely or partially.
Logical HP Business BASIC/XL always evaluates both operands.
evaluation
Partial HP Business BASIC/XL always evaluates the first operand,
evaluation but evaluates the second operand only if its value could
change the value of the expression.
Table 3-22 identifies each Boolean operator as unary or binary, gives
its name, and tells whether it is evaluated logically or partially.
Table 3-22. Boolean Operators
---------------------------------------------------------------------------------------------
|||||
| Operator | Unary or Binary | Operation Name | Logical or Partial |
|| | |Evaluation |
|||||
---------------------------------------------------------------------------------------------
|||||
| NOT | Unary | Negation | Logical |
|||||
---------------------------------------------------------------------------------------------
|||||
| LAND | Binary | Logical AND | Logical |
|||||
---------------------------------------------------------------------------------------------
|||||
| AND | Binary | AND | Partial |
|||||
---------------------------------------------------------------------------------------------
|||||
| LOR | Binary | Logical OR | Logical |
|||||
---------------------------------------------------------------------------------------------
|||||
| OR | Binary | OR | Partial |
|||||
---------------------------------------------------------------------------------------------
|||||
| XOR | Binary | Exclusive OR | Logical |
|||||
---------------------------------------------------------------------------------------------
Table 3-23 is the truth table for the NOT operator.
Table 3-23. NOT Truth Table
---------------------------------------------------------------------------------------------
| | |
| X | NOT X |
| | |
---------------------------------------------------------------------------------------------
| | |
| TRUE | FALSE |
| | |
---------------------------------------------------------------------------------------------
| | |
| FALSE | TRUE |
| | |
---------------------------------------------------------------------------------------------