HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
INTERFACE
Chapter 10 391
INTERFACE
Introduces an interface block.
Syntax
INTERFACE [
generic-spec
]
generic-spec
is one of:
generic-name
OPERATOR(
defined-operator
)
ASSIGNMENT(=)
generic-name
is the name of a generic procedure.
defined-operator
is one of:
An intrinsic operator
.
operator
., where
operator
is a user-defined name
Description
The INTERFACE statement is the first statement of an interface block. Interface blocks
constitute the mechanism by which external procedures may be given explicit interfaces and
also provide additional functionality, as described below.
The INTERFACE
generic-name
form defines a generic interface for the procedures in the
interface block.
The INTERFACE OPERATOR (
defined-operator
) form is used to define a new operator or to
extend the meaning of an existing operator.
The INTERFACE ASSIGNMENT(=) form is used to extend the assignment operator so that it can
be used (for example) with derived-type objects.
Examples
The following examples illustrate different forms of the interface block:
! make explicit the interfaces of external function spline
! and external subroutine sp2
INTERFACE
REAL FUNCTION spline(x,y,z)
END FUNCTION spline