Defining Intrinsics [ HP Pascal/iX Programmer's Guide ] MPE/iX 5.0 Documentation
HP Pascal/iX Programmer's Guide
Defining Intrinsics
Syntactically, an intrinsic is defined in the same way as any other
routine. (Refer to the HP Pascal/iX Reference Manual or the HP
Pascal/HP-UX Reference Manual for details.) Because an intrinsic can be
called by a program written in any language that the operating system
supports, its intrinsic parameters must be of types that have
counterparts in the other supported languages.
These HP Pascal types are acceptable for intrinsic parameters and
function returns:
Array
Boolean
Char
Function
Integer
Longreal
Procedure
Real
Record
Set
Shortint
Subrange m..n except where m>=0 and n<=255
These HP Pascal types are not acceptable for intrinsic parameters or
function returns:
Anyptr
Bit16
Bit32
Bit52
Longint
Conformant array
Enumeration
File
Function type
Globalanyptr
Localanyptr
PAC, with the directive EXTERNAL FTN77 *
Pointer
Procedure type
String
Subrange m..n where m>=0 and n<=255
* An intrinsic parameter of type PAC is not an acceptable intrinsic
parameter when used in an external procedure declaration with the
directive EXTERNAL FTN77.
If you define your own intrinsics, restrict system programming extensions
to:
* Compiler options ALIGNMENT and EXTNADDR (refer to the HP Pascal/iX
Reference Manual or the HP Pascal/HP-UX Reference Manual).
* ANYVAR and READONLY intrinsic parameters (explained in Chapter 7
).
* Procedure options EXTENSIBLE, UNCHECKABLE_ANYVAR, and
DEFAULT_PARMS (explained in Chapter 8 ).
An intrinsic definition can specify default values for some or all of its
parameters with the procedure option DEFAULT_PARMS. If programs that use
the intrinsic do not provide actual parameters for these intrinsic
parameters, the intrinsic parameters receive their default values.
An intrinsic definition can specify that a given number of its parameters
are nonextensible (required) with the procedure option EXTENSIBLE.
Programs that use the intrinsic need not provide actual parameters for
extensible intrinsic parameters; they must provide actual parameters for
nonextensible parameters--although the actual parameters can be empty if
the DEFAULT_PARMS procedure option specifies default values for them.
(See Chapter 8 for more information on the procedure options
DEFAULT_PARMS and EXTENSIBLE.)
Compile your intrinsics and create an object file. This object file can
be linked with other object files or used to build a library.
MPE/iX 5.0 Documentation