HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Basic terms and concepts
Chapter 11504
NOTE Some compile-line options—for example, +autodbl—change the default data
type sizes and can cause different or invalid intrinsic procedure references.
Classes of intrinsics
Intrinsic procedures are classified as:
Elemental intrinsics
Transformational functions
Inquiry functions
The following sections describe each class. The descriptions in “Intrinsic procedure
specifications” on page 514 identify the class of each intrinsic.
Elemental intrinsics
An intrinsic procedure is elemental if it is specified as having scalar arguments but will actual
arguments that are arrays. Calling an elemental intrinsic with an array argument causes the
function to perform the scalar operation on each element of the array. MVBITS is the only
elemental subroutine. All other intrinsic subroutines are nonelemental.
An elemental function that is called with all scalar dummy arguments delivers a scalar result.
Calling an elemental function with conformable array arguments, however, results in a
conformable array result. If both array and scalar arguments are specified to an elemental
function, each scalar is treated as an array in which all elements have the scalar value. The
“scalar array” is conformable with the array arguments.
Transformational functions
Transformational intrinsic functions are nonelemental. Such functions require at least one
array argument and return either a scalar or array result based on actual arguments that
cannot be evaluated elementally. Often, an array result will be of a different shape than the
argument(s). For example, SUM returns a scalar result that represents the sum of all the
elements of the array argument.
Inquiry functions
Inquiry intrinsic functions return information based on the properties of the principal
argument—its value is irrelevant, and the argument need not be defined. For example, the
SIZE inquiry function can be used to return the extent of an array along one dimension or the
total number of elements in the array.