TAL Reference Manual
Expressions
TAL Reference Manual—526371-001
4-9
Unsigned Arithmetic Operators
Effect on Hardware Indicators
Signed arithmetic operators affect the hardware indicators as described in Testing
Hardware Indicators on page 4-16.
Unsigned Arithmetic Operators
Typically, you use binary unsigned arithmetic on operands with values in the range 0
through 65,535. For example, you can use unsigned arithmetic with pointers that
contain standard addresses. Table 4-5
summarizes unsigned arithmetic operators and
the operand types on which they can operate.
Table 4-5. Unsigned Arithmetic Operators (page1of2)
Operator Operation Operand Type Example
‘+’
Unsigned addition STRING, INT, or
UNSIGNED(1–16)
alpha '+' beta
‘-’
Unsigned subtraction STRING, INT, or
UNSIGNED(1–16)
alpha '-' beta
‘*’
Unsigned multiplication STRING, INT, or
UNSIGNED(1–16)
alpha '*' beta
VST0403.vsd
3
2
5
0
up 3
a := 2.015F * (b + C);
FIXED a;
FIXED (2) b;
FIXED (-1) c;
Data declarations
The fpoint of C is increased by 3
The final result is truncated by 5
places to match the fpoint of A