HP Pascal/iX Programmer's Guide (31502-90023)

10: 10
-----------------------------------------------------------------------------------------------
| | |
| Shortint | Integer |
| | |
-----------------------------------------------------------------------------------------------
| | |
| Shortint | Integer subrange
m..n
|
| | (except where
m
>=0 and
n
<=255) |
| | |
-----------------------------------------------------------------------------------------------
Table 10-4 shows which intrinsic and formal reference parameter types
are compatible. The
intrinsic parameter type
is the type that the
intrinsic parameter has in the intrinsic file; the
formal parameter types
are the types that you can give the formal parameter when you declare it
in your program.
Table 10-4. Compatible Intrinsic and Formal Reference Parameter Types
-------------------------------------------------------------------
| | |
| Intrinsic Parameter Type | Formal Parameter Type |
| | |
-------------------------------------------------------------------
| | |
| VAR | VAR |
| | |
-------------------------------------------------------------------
| | |
| ANYVAR | ANYVAR |
| | VAR |
| | |
-------------------------------------------------------------------
| | |
| UNCHECKABLE_ANYVAR | UNCHECKABLE_ANYVAR |
| | VAR |
| | |
-------------------------------------------------------------------
| | |
| READONLY | READONLY |
| | VAR |
| | |
-------------------------------------------------------------------
Value Parameter Compatibility.
A formal value parameter is compatible with its corresponding intrinsic
parameter if any of the following is true:
* They are intrinsic-compatible (see Table 10-5 ).
* If the intrinsic parameter is an array, record, or set, then:
sizeof
(
formal_parameter
) =
sizeof
(
intrinsic_parameter
)
An intrinsic and formal value parameter are
intrinsic-compatible
if their
types are in the same row of Table 10-5 . The
intrinsic parameter
type
is the type of the intrinsic parameter, as the intrinsic file
declares it. The
formal parameter type
is the type of the formal
parameter.
Table 10-5. Intrinsic-Compatible Intrinsic and Formal Value Parameter Types
---------------------------------------------------------------------------
| | |
| Intrinsic Parameter Type | Formal Parameter Type |
| | |
---------------------------------------------------------------------------
| | |