HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
3- 43
External Parameter Type Correspondence
When a program calls an external routine, the types of the actual
parameters must correspond to the types of the formal parameters.
When a program declares an external function that is not declared as
INTRINSIC, the return type in the EXTERNAL statement must correspond to
the return type in the function's original definition.
Table 3-33 shows the correspondence between parameter types in HP
Business BASIC/XL, HP Pascal/XL, and HP C/XL.
Table 3-33. Parameter Type Correspondence
---------------------------------------------------------------------------------------------
| |||||
| HP Business | Formal | Formal | Formal | Formal |
| BASIC/XL | Parameter | Parameter | Parameter | Parameter |
| Actual | Typed Declared | Type in | Type in | Type in |
| Parameter | in EXTERNAL | HP Business | HP Pascal/XL | HP C/XL |
| Type | Declaration | BASIC/XL |||
| |||||
---------------------------------------------------------------------------------------------
||||||
| String$ | String$ | String$ | STRING | Not supported |
||||||
---------------------------------------------------------------------------------------------
||||||
| String$ | BYTE STRING$ | Not supported | Packed array of | char |
| | | | char | |
||||||
---------------------------------------------------------------------------------------------
||||||
| Any type except | BYTE | Not supported | Any type | char |
| String$ | | | requiring exactly | |
||||8bits of storage | |
||||||
---------------------------------------------------------------------------------------------
||||||
| SHORT INTEGER | SHORT INTEGER | SHORT INTEGER | SHORTINT | short |
||||||
---------------------------------------------------------------------------------------------
||||||
| INTEGER | INTEGER | INTEGER | INTEGER | int |
||||||
---------------------------------------------------------------------------------------------
||||||
| SHORTREAL | SHORTREAL | SHORTREAL | REAL | float |
||||||
---------------------------------------------------------------------------------------------
||||||
| REAL | REAL | REAL | LONGREAL | double |
||||||
---------------------------------------------------------------------------------------------
||||||
| SHORT DECIMAL | SHORT DECIMAL | SHORT DECIMAL | Not supported* | Not supported* |
||||||
---------------------------------------------------------------------------------------------
||||||
| DECIMAL | DECIMAL | DECIMAL | Not supported* | Not supported* |
||||||
---------------------------------------------------------------------------------------------
Table 3-33 Note
* Decimal parameters can be passed to an external routine written in
any language by defining an appropriate type in that language.