HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
3- 31
10 I=1 10 I=1
20 PRINT (I LOR FNI(I)); I 20 PRINT (I OR FNI(I)); I
99 END 99 END
If array A has Maxindex elements, and Index is greater than Maxindex,
then the statement
100 IF (Index &> Maxindex) OR (A(Index) =5) THEN GOTO 500
does not evaluate A(Index), and an error does not occur. The statement
200 IF (Index &> Maxindex) LOR (A(Index) =5) THEN GOTO 600
does evaluate A(Index), and an error occurs (subscript out of range).
Table 3-26 is the truth table for the XOR operator. XOR is different
from the OR and LOR operators in that it returns TRUE only when the first
or the second operator is TRUE, but the operators are not both TRUE. The
OR and LOR operators return TRUE if one or both operands are TRUE.
Table 3-26. XOR Truth Table
---------------------------------------------------------------------------------------------
||||
| X | Y | XORY |
||||
---------------------------------------------------------------------------------------------
||||
| TRUE | TRUE | FALSE |
||||
---------------------------------------------------------------------------------------------
||||
| TRUE | FALSE | TRUE |
||||
---------------------------------------------------------------------------------------------
||||
| FALSE | TRUE | TRUE |
||||
---------------------------------------------------------------------------------------------
||||
| FALSE | FALSE | FALSE |
||||
---------------------------------------------------------------------------------------------
Examples These expressions are TRUE:
0 XOR 1 (3-(2+1)) XOR 85 (6 <=5) XOR (7+3)
1 XOR 0 35677 XOR (9-(3*3)) (X < (X-1) XOR ("A" = "A")
These expressions are FALSE:
0 XOR 0 ("cat" = "dog") XOR ("a" = "b") (X = (X+1)) XOR (X-X)
1 XOR 1 ("cat" < "dog") XOR ("a" < "b") 365 XOR 366
String Concatenation Operator
The string concatenation operator has two string operands and a string
result.