Compiler Library/XL Reference Manual (32650-90029)
1- 13
Table 1-11. Packed-Decimal Procedures
---------------------------------------------------------------------------------------------
| | |
| Procedure | Description |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACADDD | Adds two packed-decimal numbers. |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACCMPD | Compares two packed-decimal operands and sets a |
| | comparison code. |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACCVAD | Converts from ASCII to packed-decimal |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACCVBD | Converts a binary number to packed-decimal. |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACCVDA | Converts a packed-decimal number to ASCII. |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACCVDB | Converts a packed-decimal number to binary. |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACLONGDIVD or HPPACDIVD | Calculates the quotient, or the quotient and the |
| | remainder, of a packed-decimal dividend and a |
| | packed-decimal divisor. |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACMPYD | Multiplies two packed-decimal numbers |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACNSLD | Performs a packed-decimal normalizing left shift. |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACSLD | Performs a packed-decimal left shift. |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACSRD | Performs a packed-decimal right shift. |
| | |
---------------------------------------------------------------------------------------------
| | |
| HPPACSUBD | Subtracts one packed-decimal number from another. |
| | |
---------------------------------------------------------------------------------------------
You can use the HP Pascal intrinsic statement to declare the compiler
library procedure or function. For HP Pascal, for example, the external
declaration could be declared:
FUNCTION SIN (VAR x:REAL): REAL;EXTERNAL;
or the external declaration could more easily be declared as:
FUNCTION SIN:REAL;INTRINSIC;
You can use the HP FORTRAN 77 system intrinsic statement to declare the
compiler library procedure or function.
For HP FORTRAN 77/XL, for example, the external declaration could be