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.

<strong>HP</strong> <strong>Fortran</strong> statements<br />

INTRINSIC (statement and attribute)<br />

Whenever an intrinsic name is passed as an actual argument and no other appearance of the<br />

name in the same scoping unit indicates that it is a procedure, it must be specified by the<br />

calling program in an INTRINSIC statement, or (if a function name) in a type declaration<br />

statement that includes the INTRINSIC attribute.<br />

Each name can appear only once in an INTRINSIC statement and in at most one INTRINSIC<br />

statement within the same scoping unit. Also, a name cannot appear in both an EXTERNAL and<br />

an INTRINSIC statement within the same scoping unit.<br />

Examples<br />

SUBROUTINE subr ! caller<br />

DOUBLE PRECISION :: dsin,x,y,func<br />

INTRINSIC dsin<br />

...<br />

y = func(dsin,x)<br />

...<br />

END SUBROUTINE subr<br />

DOUBLE PRECISION FUNCTION func(proc,y) ! callee<br />

DOUBLE PRECISION :: y, proc<br />

...<br />

func = proc(y)<br />

...<br />

END FUNCTION func<br />

Related statements<br />

EXTERNAL<br />

Related concepts<br />

For additional information about passing user-defined and intrinsic procedures as arguments,<br />

see “Procedure dummy argument” on page 142. Intrinsic procedures are described in<br />

“Intrinsic procedure specifications” on page 479.<br />

360<br />

Chapter 10

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

Saved successfully!

Ooh no, something went wrong!