Compiler Library/XL Reference Manual (32650-90029)

4- 13
the quotient does not exceed 28 digits. If it does, results are
undefined.
Possible Traps
Invalid packed-decimal digit (3)
Invalid decimal operand length (5)left arrow
For HPPACDIVD only
Decimal divide-by-zero (6)
HPPACMPYD
HPPACMPYD performs multiplication of two decimal numbers.
Declaration
PROCEDURE HPPACMPYD (
ANYVAR operand2 :decimal_type;
op2digs :INTEGER
ANYVAR operand1 :decimal_type
op1digs :INTEGER;
shift_amt :INTEGER;
VAR comparison_code :INTEGER;
VAR pacstatus :INTEGER)
OPTION
DEFAULT_PARMS (
comparison_code :=NIL,
pacstatus :=NIL)
UNCHECKABLE_ANYVAR;
EXTERNAL;
Comments
Operand1
and
operand2
are multiplied and the product is stored into the
operand2
field. If all significant digits of the result do not fit into
the
operand2
field, a decimal overflow occurs. The result stored in this
case will be left-truncated unless the actual result is greater than 28
digits. If the actual result is over 28 digits, nothing will be stored.
Possible Traps
Decimal overflow (1)
Invalid packed-decimal digit (3)
Invalid decimal operand length (5)
HPPACNSLD
HPPACNSLD performs a decimal normalizing left shift.
Declaration
PROCEDURE HPPACNSLD (
ANYVAR operand2 :decimal_type;
op2digs :INTEGER;
ANYVAR operand1 :decimal_type;
op1digs :INTEGER;
VAR shift_amt :INTEGER;
VAR comparison_code :INTEGER;
VAR pacstatus :INTEGER;
VAR carry :INTEGER)
OPTION
DEFAULT_PARMS (
comparison_code :=NIL,
pacstatus :=NIL,
carry :=NIL)
UNCHECKABLE_ANYVAR;
EXTERNAL;