HP 3000 Manuals

HPPACSUBD [ Compiler Library/XL Reference Manual ] MPE/iX 5.0 Documentation


Compiler Library/XL Reference Manual

HPPACSUBD 

HPPACSUBD performs decimal subtraction.

Declaration 

     PROCEDURE HPPACSUBD (
                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 is subtracted from operand2 and the difference is stored
    into the operand2 field.

 *  A decimal overflow occurs if the result digits do not fit in the
    operand2 field.  The left-truncated result is stored in operand2 and
    a trap occurs.

Possible Traps 

Decimal overflow (1)
Invalid packed-decimal digit (3)
Invalid decimal operand length (5)



MPE/iX 5.0 Documentation