TAL Reference Manual
Expressions
TAL Reference Manual—526371-001
4-24
Group Comparison Expression
count
is a positive INT arithmetic expression that defines the number of units in var2 to
compare. When
count-unit is not present, the units compared are:
count-unit
is BYTES, WORDS, or ELEMENTS. count-unit changes the meaning of count to the
following:
If
count-unit is not BYTES, WORDS, or ELEMENTS, the compiler issues an error. If
you specify BYTES, WORDS, or ELEMENTS, the term cannot also appear as a
DEFINE or LITERAL identifier in the global declarations or in any procedure or
subprocedure in which the group comparison expression appears.
constant
is a number, a character string, or a LITERAL to which var1 is compared.
var2 Data Type Units Compared
Simple variable, array, simple pointer
(including those declared in structures)
STRING
INT
INT(32) or REAL
FIXED or REAL(64)
Bytes
Words
Doublewords
Quadruplewords
Structure Not applicable Words
Substructure Not applicable Bytes
Structure pointer STRING*
INT*
Bytes
Words
BYTES Compares count bytes. If var1 and var2 both have word addresses,
BYTES generates a word comparison for (count + 1) / 2 words
WORDS Compares count words
ELEMENTS Compares count elements. The elements compared depend on the
nature of var2 and its data type as follows:
var2 Data Type Units Compared
Simple variable, array,
simple pointer (including
those declared in
structures)
STRING
INT
INT (32) or REAL
FIXED or REAL (64)
Bytes
Words
Doublewords
Quadruplewords
Structure Not applicable Structure occurrences
Substructure Not applicable Substructure occurrences
Structure pointer STRING*
INT*
Structure occurrences
Structure occurrences
* For structure pointers, STRING and INT have meaning only in group comparison expressions and move
statements.