HP Pascal/iX Programmer's Guide (31502-90023)
10: 14
3. Declare your intrinsics as you would declare external routines
(explained in Chapter 9 ), except:
* Use only the acceptable intrinsic parameter types listed in
"Defining Intrinsics" .
* Use only these forms of the EXTERNAL directive:
EXTERNAL
EXTERNAL C
EXTERNAL COBOL
EXTERNAL FTN77
4. Leave the outer block of the compilation unit empty.
Example 1
This program builds an intrinsic file.
$BUILDINT 'myintr'$
$STANDARD_LEVEL 'EXT_MODCAL'$
PROGRAM build_intrinsic_file;
TYPE
t_integer_1 = $ALIGNMENT 1$ integer; {allows byte-aligned integer}
t_barray = PACKED ARRAY [1..1024] OF CHAR;
t_status = RECORD
f1 : shortint;
f2 : shortint;
END;
PROCEDURE proc1 ( i : integer;
VAR b : integer
);
EXTERNAL;
PROCEDURE proc2 (ANYVAR $EXTNADDR$ parm1 : t_barray;
parm2 : shortint
)
OPTION DEFAULT_PARMS (parm1 := NIL,
parm2 := 0
)
UNCHECKABLE_ANYVAR;
EXTERNAL;
PROCEDURE proc3 ( parm1 : integer;
VAR parm2 : t_status
)
OPTION EXTENSIBLE 1;
EXTERNAL;
PROCEDURE cob_proc (VAR i : t_integer_1); EXTERNAL COBOL;
BEGIN
{empty body}
END.
To change an existing intrinsic file:
1. Put the BUILDINT option at the front of the compilation unit.
Specify the name of the intrinsic file that you want to change.
2. Declare any new constants, types, or variables that will appear in
new or changed intrinsic routines headings.