Table Membership

<arithmetic table membership>

──<arithmetic expression>── IN ──<truth set table>─────────────────────┤

<pointer table membership>

──<pointer expression>── IN ──<truth set table>────────────────────────►
►─┬────────────────────────────────┬───────────────────────────────────┤
  └─ FOR ──<arithmetic expression>─┘

The table membership constructs allow testing to determine whether a character is a member of a truth set. The character can be either a character in a string literal or a character in an array row referenced by a pointer expression. In a pointer table membership primary, the FOR <arithmetic expression> part applies the membership test to the first arithmetic expression characters to which the pointer expression points. If the pointer expression does not have the same character size as the truth set table, unpredictable results can occur.

The subscripted variable form of the truth set table construct allows several truth set tables to be contained in one array row. The value of the subscript indicates the beginning of the desired table within the array row. For a description of truth sets, refer to TRUTHSET Declaration.

Examples of Boolean Expressions

Valid

Invalid

TRUE

SQRT(X)

BOOL

5.67

B.[11:1]

–X

B := TRUE

R + TRUE

B1 := * AND B2

CSIN(C1) > CSIN(C2)

CSIN(C1) = CSIN(C2)

P1 > P2

X > Y

S1 IS "ABCD"

NOT B

R = 3

PTR = "ABCD"

P1 < P2 FOR 20

S1 !! S2 = S3

HAPPENED(E)

CASE I OF (B1, TRUE, X = Y)

NOT FYLE.OPEN

P1 = P2

BOOL & TRUE [19:1]

X IN ALPHA8

P1 IN ALPHA8 FOR 6