02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Program units and procedures<br />

Procedure interface<br />

Interface blocks<br />

An interface block is used to provide an explicit interface for external procedures or to<br />

define a generic procedure. An interface block may appear in any program unit, except a block<br />

data program unit. It is specified in the specification part of the program unit.<br />

The syntax for an interface block is:<br />

INTERFACE [generic-spec]<br />

[interface-body]...<br />

[MODULE PROCEDURE module-procedure-name-list]<br />

END INTERFACE<br />

generic-spec<br />

generic-name<br />

operator<br />

interface-body<br />

150<br />

is one of:<br />

generic-name<br />

OPERATOR (operator)<br />

ASSIGNMENT (=)<br />

If generic-spec is omitted, then the MODULE PROCEDURE statement must<br />

also be omitted.<br />

is the name of the generic procedure that is referenced in the subprogram<br />

containing the interface block.<br />

is a unary or binary operator—intrinsic or user-defined—of the form:<br />

.letter[letter]... .<br />

is:<br />

function-statement<br />

[specification-part]<br />

end-function-statement<br />

or<br />

module-procedure-name-list<br />

subroutine-statement<br />

[specification-part]<br />

end-subroutine-statement<br />

Chapter 7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!