HPPACADDD [ Compiler Library/XL Reference Manual ] MPE/iX 5.0 Documentation
Compiler Library/XL Reference Manual
HPPACADDD
The HPPACADDD procedure adds two operands and stores the result.
Declaration
PROCEDURE HPPACADDD (
ANYVAR operand2 :decimal_type;
op2digs :INTEGER;
ANYVAR operand1 :decimal_type;
op1digs :INTEGER;
VAR comparison_code :INTEGER;
VAR pacstatus :INTEGER)
OPTION
DEFAULT_PARMS (
comparison_code :=NIL,
pacstatus :=NIL)
UNCHECKABLE_ANYVAR;
EXTERNAL;
Comments
Operand1 and operand2 are added and the sum is stored into the operand2
field. A decimal overflow occurs if all significant digits of the result
do not fit in the operand2 field. This results in a trap, and the
left-truncated result is stored in the operand2 field.
Possible Traps
Decimal overflow (1)
Invalid packed-decimal digit (3)
Invalid decimal operand length (5)
MPE/iX 5.0 Documentation