TAL Programmer's Guide

Conditional Expressions
Using Expressions
096254 Tandem Computers Incorporated 5–23
Relational Operators Relational operators can be signed or unsigned.
Signed Relational Operators
Signed relational operators perform signed comparison of two operands and return a
true or false state. Table 5-17 describes signed relational operators, operand data
types, and the results yielded by such operators.
Table 5-17. Signed Relational Operators and Result Yielded
Operator Operation Operand Type
*
Result
< Signed less than Any data type True/False
= Signed equal to Any data type True/False
> Signed greater than Any data type True/False
<= Signed less than or equal to Any data type True/False
>= Signed greater than or equal to Any data type True/False
<> Signed not equal to Any data type True/False
*
The data type of the operands must match except as noted in “Data Types of Expressions”
earlier in this section.
Unsigned Relational Operators
Unsigned relational operators perform unsigned comparison of two operands and
return a true or false state. Table 5-18 describes unsigned relational operators,
operand data types, and the results yielded by such operators.
Table 5-18. Unsigned Relational Operators and Result Yielded
Operator Operation Operand Type Result
'<' Unsigned less than STRING, INT, UNSIGNED (1–16) True/False
'=' Unsigned equal to STRING, INT, UNSIGNED (1–16) True/False
'>' Unsigned greater than STRING, INT, UNSIGNED (1–16) True/False
'<=' Unsigned less than or equal to STRING, INT, UNSIGNED (1–16) True/False
'>=' Unsigned greater than or equal to STRING, INT, UNSIGNED (1–16) True/False
'<>' Unsigned not equal to STRING, INT, UNSIGNED (1–16) True/False
Effect on Hardware Indicators
Relational operators set the condition code indicator, as described in “Testing
Hardware Indicators” later in this section.