The previous examples have shown logical operations on simple variables, constants and string literals. Logical operations, however, may also be performed on arrays or subranges of arrays which are of similar type and size.
$$
$$ Declarations
$$
NUMBER/A(3),B(3)
DATA/A,1,2,3
DATA/B,1,4,3
$$
$$ If Statement
$$
IIF/A==B,JUMP/A1:
MESSG/'ARRAY A IS NOT EQUAL TO ARRAY B
JUMP/A2:
A1:
.
A2:
Since A in the example above, which was set to 1, 2 and 3, is not equal to B, which was set to 1, 4 and 3, the message ARRAY A IS NOT EQUAL TO ARRAY B is displayed and the program branches to label A2:. The statements between label A1: and label A2:, therefore, are not executed.
The logical array comparison in the program above would be equal to the individual comparison in the program below.
$$
$$ Declarations
$$
NUMBER/A(3),B(3)
DATA/A,1,2,3
DATA/B,1,4,3
DO/A1:,I,1,3
$$
$$ If Statement
$$
IIF/A(I)<>B(I),JUMP/A2:
A1:
JUMP/A3:
A2:
MESSG/'ARRAY A IS NOT EQUAL TO ARRAY B
JUMP/A4:
A3:
A4: