TAL Programmer's Guide

Group Comparison Expression
Using Special Expressions
096254 Tandem Computers Incorporated 13–9
Testing the Condition
Code Setting
The system treats the items being compared as unsigned values. After a group
comparison, you can test the condition code setting by using the following relational
operators (with no operands) in a conditional expression:
< CCL if var1 '<' var2
= CCE if var1 = var2
> CCG if var1 '>' var2
The following example compares two arrays and then tests the condition code setting
to see if the value of the element in D_ARRAY that stopped the comparison is less than
the value of the corresponding element in S_ARRAY:
INT in_array[0:9];
INT out_array[0:9];
!Code to assign values to arrays
IF d_array = s_array FOR 10 –> ELEMENTS @ptr THEN
BEGIN !They matched
!Do something
END
ELSE
IF < THEN ... ; !PTR points to D_ARRAY element
! that is less than the
! corresponding S_ARRAY element