HP 3000 Manuals

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


Compiler Library/XL Reference Manual

HPPACCVDA 

HPPACCVDA converts a packed-decimal number to ASCII.

Declaration 

      PROCEDURE HPPACCVDA (
                ANYVAR  target          :ascii_type;
                        targetdigs      :INTEGER;
                ANYVAR  source          :decimal_type;
                        sign_control    :INTEGER;
                VAR     comparison_code :INTEGER;
                VAR     pacstatus       :INTEGER)
          OPTION
                DEFAULT_PARMS (
                        sign_control    :=0,
                        comparison_code :=NIL,
                        pacstatus       :=NIL)
                UNCHECKABLE_ANYVAR;
          EXTERNAL;

Comments 

 *  The source packed-decimal digits are converted to fill the
    target field.  An unsigned source operand produces an unsigned
    external-decimal result.  When the source is signed, the sign of the
    result is determined by the two low-order bits of sign_control as
    described below.

     sign_control = 0    Target sign is the same as source.

     sign_control = 1    Target is negative if source is negative.
                             Otherwise, it is unsigned.

     sign_control = 2    Target is unsigned.

     sign_control = 3    Target is unsigned.

 *  Comparison_code is set in accordance with the stored result.  An
    unsigned result is considered nonnegative, so only 0 or 2 can be
    returned in comparison_code if sign_control is 2 or 3.

 *  If the target count is zero, no conversion is performed.

Possible Traps 

Invalid packed-decimal digit (3)
Invalid decimal operand length (5)



MPE/iX 5.0 Documentation