FORTRAN Reference Manual
Intrinsic Functions
FORTRAN Reference Manual—528615-001
8-2
Referencing an Intrinsic Function
Referencing an Intrinsic Function
You can reference an intrinsic function in a main program or in a subprogram.
You reference an intrinsic function by using it in an expression. For example, in the
following assignment statement, FORTRAN evaluates the MAX function to determine
the largest value in its argument list, multiplies the result of the MAX function by 5, and
stores the result in X:
x = MAX (dmon, tue, wed, thu, fri) * 5
Table 8-1. FORTRAN Intrinsic Functions (page 1 of 2)
Generic Function Name Description of Returned Value
ABS Absolute value
ACOS Arccosine expressed in radians
AIMAG Imaginary part of a complex number
AINT Integer after truncation
ANINT Nearest whole number
ASIN Arcsine expressed in radians
ATAN Arctangent expressed in radians
ATAN2 Arctangent expressed in radians
CHAR Character value of a specified position in the ASCII collating
sequence
CMPLX Conversion of any numeric type to complex
CONJG Conjugate of a complex number
COS Cosine of an angle in radians
COSH Hyperbolic cosine
DBLE Conversion of any numeric type to double precision
DIM Positive difference
DPROD Double precision product
EXP Exponential
FILENUM Guardian file number of a connected unit
ICHAR Character position of a character in the ASCII collating
sequence
INDEX Starting position of a substring within a string
INT Conversion of any numeric type to integer
LEN Length of a character string
LOG Natural logarithm
LOG10 Base 10 logarithm
MAX Largest value










