HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Basic terms and concepts
Chapter 11 503
Basic terms and concepts
The following sections describe the terms and concepts that are used in this chapter to
describe intrinsic procedures.
Availability of intrinsics
An intrinsic procedure is available in every Fortran 90 program unit except when an intrinsic
and a user-defined procedure (or a library procedure) have the same name, and the
user-defined procedure:
Has the EXTERNAL attribute; see “EXTERNAL (statement and attribute)” on page 358 for
more information. Library routines are declared in the user program with the EXTERNAL
attribute so that they will be called instead of intrinsics that have the same name.
Has an explicit interface; see “Procedure interface” on page 181 for a description. A
statement function has an explicit interface and therefore, if it has the same name as an
intrinsic, will be recognized instead of the intrinsic.
Both a user-defined procedure and an intrinsic may have the same name when the
user-defined procedure is used to extend a generic intrinsic and the argument types differ.
See “Generic procedures” on page 183 for a description of this.
Subroutine and function intrinsics
Intrinsic procedures are available as functions and subroutines. In general, they behave the
same as user-defined subroutines and functions. Intrinsic subroutines are invoked by the
CALL statement and can return values through arguments passed to the intrinsic. Intrinsic
functions can be referenced as part of an expression or in a statement that expects a value.
All interface intrinsic subroutines and functions have an explicit interface.
Generic and specific function names
The names of intrinsic functions can be either generic or specific. The name is generic—for
example, ABS—if it permits arguments of different types. A name is specific—for example,
IABS—if it permits arguments of one data type only.
A specific intrinsic function can be passed as an argument if it has the INTRINSIC attribute. A
generic intrinsic function can have the INTRINSIC attribute if it is also the specific name, as in
the case of the SIN intrinsic. See “Procedure dummy argument” on page 174 and the
description of “INTRINSIC (statement and attribute)” on page 393.