Compiler Library/XL Reference Manual (32650-90029)

4-: 8
op2digs :INTEGER;
VAR comparison_code :INTEGER;
VAR pacstatus :INTEGER)
OPTION
DEFAULT_PARMS (
comparison_code :=NIL,
pacstatus :=NIL)
UNCHECKABLE_ANYVAR;
EXTERNAL;
Comments
Operand1
is compared to
operand2
and
comparison_code
is set. The
operands remain unchanged at their original addresses.
Possible Traps
Invalid packed-decimal digit (3)
Invalid decimal operand length (5)
HPPACCVAD
HPPACCVAD performs an ASCII-to-decimal conversion.
Declaration
PROCEDURE HPPACCVAD (
ANYVAR target : decimal_type;
targetdigs : INTEGER;
ANYVAR source : ascii_type;
sourcedigs : INTEGER;
VAR comparison_code : INTEGER;
VAR pacstatus : INTEGER)
OPTION
DEFAULT_PARMS (
comparison_code := NIL,
pacstatus := NIL)
UNCHECKABLE_ANYVAR;
EXTERNAL;
Comments
* Source digits in external-decimal are converted to packed-decimal
digits. Source digits, except for the rightmost in the field, must
be leading blanks or unsigned digits. The rightmost digit indicates
the sign.
* Leading blanks are converted to packed-decimal zeros.
* Blanks between digits are illegal.
* An all-blank field converts to an unsigned zero target field.
* An unsigned external-decimal operand produces an unsigned
packed-decimal result.
* If the number of target digits is less than the number of source
digits, the source is converted until the target is filled, producing
a left-truncated result. In this case, the remaining source digits
are not examined for validity.
* If the source digit count is less than the target digit count, left
zero fill is placed in the target field.
* If either the source or target digit count is zero, no conversion is
performed.