HPPACSRD [ Compiler Library/XL Reference Manual ] MPE/iX 5.0 Documentation
Compiler Library/XL Reference Manual
HPPACSRD
HPPACSRD performs a decimal right shift.
Declaration
PROCEDURE HPPACSRD (
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 is moved to the operand2 field, with its digits offset to
the right relative to its sign, by the shift amount in the low-order
five bits of shift_amt.
* Digits shifted into the sign are lost.
* Zeros are shifted in from the left and high order zeros are inserted
to fill the operand2 field, if necessary.
Possible Traps
Invalid packed-decimal digit (3)
Invalid decimal operand length (5)
MPE/iX 5.0 Documentation