pTAL Reference Manual (H06.08+)

Expressions
HP pTAL Reference Manual523746-006
5-11
Comparing Addresses
Unsigned addition and subtraction operators ('+' and '-')
The INT(32) operands are treated as nonnegative values in the range 0 to 2
32
-1.
Unsigned and signed addition and subtraction are the same except that
$OVERFLOW on page 15-76 returns false after an unsigned operation.
Unsigned multiplication operator ('*')
The INT(32) operands are treated as nonnegative values in the range 0 to 2
32
-1.
The unsigned product of two INT(32) values is an FIXED value. $OVERFLOW on
page 15-76 returns false after an unsigned multiplication operator.
Unsigned division and remainder operators ('/' and '\')
You can use an FIXED dividend and INT(32) divisor with the unsigned-division and
remainder operators. The FIXED dividend is treated as a nonnegative value in the
range 0 to 2
64
-1. The INT(32) divisor is treated as a nonnegative value in the
range 0 to 2
32
-1.
The quotient or remainder of an FIXED dividend and an INT(32) divisor is an
INT(32) quotient in the range 0 to 2
32
-1.
$OVERFLOW on page 15-76 returns false after an unsigned division or remainder
operator unless either of the following is true:
The divisor is 0
The quotient is greater than 2
16
-1 for an INT quotient, 2
32
-1 for an INT(32)
Comparing Addresses
pTAL rules for comparing address types are more restrictive than the rules for
comparing nonaddress types.
Topics:
Extended Addresses on page 5-12
Nonextended Addresses on page 5-12
Table 5-9. Valid Address-Type Comparisons
Extended Addresses Non-Extended Addresses
Operators Unsigned relational operators:
none
Unsigned relational operators:
'<', '=', '>', '<=', '<>', '>='
Signed relational operators:
<, =, >, <=, <>, >=
Signed relational operators:
=, <>
Abbreviated forms Testing address type as true or
false:
IF @p THEN
IF NOT @p THEN...
Testing address type as true or
false:
IF @p THEN
IF NOT @p THEN...