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

Table 36 Signed Relational Operators
ResultOperand Type*MeaningOperator
True/FalseAny data typeSigned less than<
True/FalseAny data typeSigned equal to=
True/FalseAny data typeSigned greater than>
True/FalseAny data typeSigned less than or equal to<=
True/FalseAny data typeSigned greater than or equal
to
>=
True/FalseAny data typeSigned not equal to<>
* The data type of the operands must match except as noted in Data Types of Expressions (page 70). Only the operators
= and <> can be used when comparing operands of procedure pointer types (PROCPTR, PROC32PTR, and PROC64PTR).
For more information, see “Procedure Pointers (page 263) and “Syntax Summary” (page 432). Comparison of procedure
pointer types are only allowed if the signatures of the types (return and parameter types) match.
Unsigned Relational Operators
Unsigned relational operators perform unsigned comparison of two operands and return a true or
false state.
Table 37 Unsigned Relational Operators
ResultOperand Type*OperationOperator
True/FalseSTRING, INT, INT(32), UNSIGNED (1-16)Unsigned less than'<'
True/FalseSTRING, INT, UNSIGNED (1-16)Unsigned equal to'='
True/FalseSTRING, INT, INT(32), UNSIGNED (1-16)Unsigned greater than'>'
True/FalseSTRING, INT, INT(32), UNSIGNED (1-16)Unsigned less than or equal to'<='
True/FalseSTRING, INT, INT(32), UNSIGNED (1-16)Unsigned greater than or equal
to
'>='
True/FalseSTRING, INT, INT(32), UNSIGNED (1-16)Unsigned not equal to'<>'
*Unsigned relational operators cannot be used with operands of the extended address (EXTADDR, EXT32ADDR, and
EXT64ADDR) and the procedure pointer (PROCPTR, PROC32PTR, and PROC64PTR) types.
NOTE: The extended address (EXTADDR, EXT32ADDR, and EXT64ADDR) and the procedure
pointer (PROCPTR, PROC32PTR, and PROC64PTR) types are 64-bit addressing functionality added
to the EpTAL compiler starting with SPR T0561H01^AAP. For more information, see Appendix E,
“64-bit Addressing Functionality” (page 531).
A condition code reflects the value of the most recently evaluated root operator.
Used with no operands, signed and unsigned operators are equivalent. The result returned by such
a relational operator is:
Result ReturnedRelational Operator
True if CCL< or '<'
True if CCG> or '>'
True if CCE= or '='
True if not CCE<> or '<>'
84 Expressions