TAL Programmer's Guide
Arithmetic Expressions
Using Expressions
096254 Tandem Computers Incorporated 5–19
Table 5-13 shows the combinations of operand types you can use with binary unsigned
arithmetic operators and the result types yielded by such operators. The order of the
operand types in each combination is interchangeable except in the last case.
Table 5-13. Unsigned Arithmetic Operand and Result Types
Operator Operand Type Operand Type
Result
Type Example
'+' '–' STRING STRING INT byte1 '–' byte2
INT INT INT word1 '+' word2
INT STRING INT byte1 '–' word1
INT UNSIGNED (1–16) INT word1 '+' uns8
STRING UNSIGNED (1–16) INT byte1 '–' uns5
UNSIGNED(1–16) UNSIGNED(1–16) INT uns1 '+' uns7
'*' STRING STRING INT(32) byte1 '
*
' byte2
INT INT INT(32) word1 '
*
' word2
STRING INT INT(32) byte1 '
*
' word1
INT UNSIGNED (1–16) INT(32) word1 '
*
' uns9
STRING UNSIGNED (1–16) INT(32) uns1 '
*
' uns7
UNSIGNED(1–16) UNSIGNED(1–16) INT(32) uns1 '
*
' uns7
'/' '\' UNSIGNED(17–31) or
INT(32) dividend
STRING, INT, or
UNSIGNED(1–16)
divisor
INT dbword '\' word1
Effect on Hardware Indicators
Unsigned add and subtract operators affect the carry and condition code indicator, as
described in “Testing Hardware Indicators” later in this section.