Let's assume that the structure item myString is substructured to an array of three characters:
structureItem name="myString" length=3 structureItem name="myArray" occurs=3 length=1
The next table shows the effect of the operator in if myString
is "ABC".
Logical expression | Value of expression | Value of sysVar. ArrayIndex | Comment |
---|---|---|---|
"A" in myArray | true | 1 | The subscript of a single-dimension array defaults to 1 |
"C" in myArray[2] | true | 3 | Search begins at second element |
"A" in myArray[2] | false | 0 | The search ends at the last element |
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.