02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Program units and procedures<br />

External procedures<br />

specification-part<br />

execution-part<br />

internal-procedure-part<br />

130<br />

is zero or more of the statements listed in Table 7-1 as well as the<br />

AUTOMATIC statement.<br />

is zero or more of the statements listed in Table 7-2 as well as the following<br />

statements:<br />

ENTRY statement<br />

RETURN statement<br />

takes the form:<br />

CONTAINS<br />

[internal-procedure]...internal-procedure<br />

is the definition of an internal procedure; see “Internal procedures” on<br />

page 135.<br />

end-external-procedure-statement<br />

Procedure reference<br />

takes one of the following forms, depending on whether the procedure is a<br />

subroutine or function:<br />

END [SUBROUTINE [subroutine-name]]<br />

END [FUNCTION [function-name]]<br />

A procedure reference—also known as a procedure call—occurs when a procedure name is<br />

specified in an executable statement, which causes the named procedure to execute. The<br />

following sections describe references to subroutines and functions, and recursive<br />

references—when a procedure directly or indirectly calls itself.<br />

Referencing a subroutine<br />

A reference to an external subroutine occurs in a CALL statement, which specifies either the<br />

subroutine name or one of its entry point names. The syntax of the CALL statement is:<br />

CALL subroutine-name [([actual-argument-list])]<br />

actual-argument-list<br />

is a comma-separated list of the actual arguments that take the form:<br />

Chapter 7

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

Saved successfully!

Ooh no, something went wrong!