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

10: 8
The program can declare intr in any of these ways:
PROCEDURE intr (a, b, c, d, e : integer); {All parameters}
INTRINSIC;
PROCEDURE intr (a, b : integer); {Required parameters only}
INTRINSIC;
PROCEDURE intr (a, b, c : integer); {First extensible parameter}
INTRINSIC;
PROCEDURE intr (a, b, c, d : integer); {Extensible parameters}
INTRINSIC;
The program cannot declare intr in any of these ways:
PROCEDURE intr (a : integer); {Without second nonextensible parameter}
INTRINSIC;
PROCEDURE intr (a, b, c, d : integer) {Fewer required parameters than}
OPTION EXTENSIBLE 1; {in the intrinsic definition}
INTRINSIC;
If you supply default values for the formal parameters that you declare,
your default values override those supplied by the intrinsic definition.
Example 2
The intrinsic file defines the intrinsic Pascal procedure intr this way:
PROCEDURE intr (a, b : integer)
OPTION EXTENSIBLE 2
DEFAULT_PARMS (a := 10, b := 20);
If the program declares intr this way
PROCEDURE intr (a, b: integer)
OPTION EXTENSIBLE 2
DEFAULT_PARMS (a := 35, b := 60);
INTRINSIC;
Then the default value of a is 35 (not 10) and the default value of b is
60 (not 20).
If you declare a formal parameter, you must give it a type that is
compatible with the type of its corresponding intrinsic parameter.
Compatibility rules are different for reference and value parameters.
Reference Parameter Compatibility.
A formal reference parameter is compatible with its corresponding
intrinsic parameter if any of the following is true:
* Their types (Boolean, integer, etc.) are intrinsic-compatible
(see Table 10-3 ).
* They are alignment-compatible.
* Their types (VAR, ANYVAR, UNCHECKABLE_ANYVAR, READONLY) are
compatible.
* If the intrinsic parameter is a VAR or READONLY array, record, or
set, then:
sizeof
(
formal_parameter
) <=
sizeof
(
intrinsic_parameter
)
An intrinsic and a formal reference parameter are
intrinsic-compatible
if
their types are in the same row of Table 10-3 . The
intrinsic