pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

count
is a unsigned INT arithmetic expression that defines the number of units in var-2 to compare.
When count-unit is not present, the units compared are:
Units ComparedData Typevar-2
Simple variable, array, simple
pointer (including those declared in
structures)
BytesSTRING
WordsINT
DoublewordsINT(32) or REAL
QuadruplewordsFIXED or REAL(64)
WordsNot applicableStructure
BytesNot applicableSubstructure
Structure pointer BytesSTRING
WordsINT
count-unit
is BYTES, WORDS, or ELEMENTS. count-unit changes the meaning of count to the
following:
Compares count bytes; however, if var-1 and var-2 both have word addresses,
BYTES implicitly generates a word comparison for (count +1)/2 words.
BYTES
Compares count words.WORDS
Compares count elements. The elements compared depend on the nature of var-2
and its data type as follows:
ELEMENTS
Units ComparedData Typevar-2
Simple variable, array,
simple pointer (including
those declared in structures)
BytesSTRING
WordsINT
DoublewordsINT(32) or REAL
QuadruplewordsFIXED or REAL(64)
Structure occurrencesNot applicableStructure
(For structure pointers,
STRING and INT have
meaning only in group
comparison expressions
and move statements.)
Substructure occurrencesNot applicableSubstructure
Simple variable, array,
simple pointer (including
those declared in structures)
BytesSTRING
WordsINT
DoublewordsINT(32) or REAL
QuadruplewordsFIXED or REAL(64)
If count-unit is specified and is not BYTES, WORDS, or ELEMENTS, the compiler issues
an error. If you specify BYTES, WORDS, or ELEMENTS, the term cannot also appear as an
identifier in a LITERAL or DEFINE declaration 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 var-1 is compared.
If you enclose a simple numeric constant in brackets ([ ]) and if the destination has a byte
address or is a STRING structure pointer, the system compares a single byte regardless of the
size of constant. If you do not enclose constant in brackets or if the destination has a
word address or is an INT structure pointer, the system compares a word, doubleword, or
quadrupleword as appropriate for the size of constant.
Special Expressions 89