Numeric and Type Conversion Procedures: table

Note: Square brackets [...] denote optional arguments.

Name Procedure Type Description Argument/Function Type
ABS Intrinsic Function ABS(a). Returns absolute value of a. When ABS is passed as an argument, a must be REAL(4). a: Integer, Real or Complex

result: same type as a, except Real for Complex

AIMAG Intrinsic Function AIMAG (z). Returns imaginary part of complex number z. z: COMPLEX(4)

result: REAL(4)

AINT Intrinsic Function AINT (a[, kind]). Truncates a to whole number of specified kind (optional). When AINT is passed as an argument, a must be REAL(4). a: Real

kind: Integer

result: Real of type kind if present; else same as a

AMAX0 Intrinsic Function AMAX0(a1, a2 [, a3...]). Returns largest value among integer arguments as real. All a: INTEGER(4)

result: REAL(4)

AMIN0 Intrinsic Function AMIN0(a1, a2 [, a3...]). Returns smallest value among integer arguments as real. All a: INTEGER(4)

result: REAL(4)

ANINT Intrinsic Function ANINT(a [, kind]). Rounds to nearest whole number of specified kind (optional). When ANINT is passed as an argument, a must be REAL(4). a: Real

kind: Integer

result: Real of type kind if present; else same as a

CEILING Intrinsic Function CEILING(a [, kind]). Returns smallest integer greater than a. a: Real

kind: Integer

result: INTEGER(4)

CMPLX Intrinsic Function CMPLX(x [,y] [,kind]). Converts x and (optional) y to complex of (optional) kind. x: Integer, Real, or Complex.

y: Integer or Real; cannot appear if x is complex type

kind: Integer

result: Complex of type kind if present; otherwise, single-precision complex

CONJG Intrinsic Function CONJG(z). Returns the conjugate of a complex number. z: COMPLEX(4)

result: COMPLEX(4)

DBLE Intrinsic Function DBLE(a). Converts a to double precision type. a: Integer, Real, or Complex.

result: REAL(8)

DCMPLX Intrinsic Function DCMPLX(x [, y]). Converts the argument to double complex type. x: Integer, Real, or Complex.

y: Integer or Real; cannot appear if x is complex type

result: Double complex

DFLOAT Intrinsic Function DFLOAT(a). Converts an integer to double precision type. a: Integer

result: REAL(8)

DIM Intrinsic Function DIM(x, y). Returns x-y if positive; else 0. When DIM is passed as an argument, a must be REAL(4). x: Integer or Real

y: same as x

result: same type as x

DPROD Intrinsic Function DPROD(x, y). Returns double-precision product of single precision x and y. x: REAL(4)

y: REAL (4)

result: REAL(8)

FLOAT Intrinsic Function FLOAT(i). Converts i to REAL(4). i: Integer

result: REAL(4)

FLOOR Intrinsic Function FLOOR(a [, kind]). Returns the greatest integer less than or equal to a. a: Real

kind: Integer

result: Integer

IFIX Intrinsic Function IFIX(a). Converts a single-precision real argument to an integer argument by truncating. x: REAL(4)

result: Default integer (usually INTEGER(4))

IMAG Intrinsic Function Same as AIMAG.  
INT Intrinsic Function INT(a [, kind]). Converts a value to integer type. a: Integer, Real, or Complex

kind: Integer

result: Integer of type kind if present; else same as a

LOGICAL Intrinsic Function LOGICAL(l [, kind]). Converts between logical arguments of (optional) kind. l: Logical

kind: Integer

MAX Intrinsic Function MAX(a1, a2 [, a3...]). Returns largest value among arguments. All a: any type

result: same type as a

MAX1 Intrinsic Function MAX1(a1, a2 [, a3...]). Returns largest value among real arguments as integer. All a: Real(4)

result: Integer

MIN Intrinsic Function MIN(a1, a2 [, a3...]). Returns largest value among arguments. All a: any type

result: same type as a

MIN1 Intrinsic Function MIN1(a1, a2 [, a3...]). Returns smallest value among real arguments as integer All a: REAL(4)

result: Integer

MOD Intrinsic Function MOD(a, p). Returns remainder of a/p. When MOD is passed as an argument, a must be integer. a: Integer or Real

p: same as a

result: same type as a

MODULO Intrinsic Function MODULO(a, p). Returns a modulo p. a: Integer or Real

p: same as a

result: same type as a

NINT Intrinsic Function NINT(a [, kind]). Returns the nearest integer to a. a: Real

kind: Integer

result: Integer of type kind if present; else see Reference entry

REAL Intrinsic Function REAL(a [, kind]). Converts a value to real type. a: Integer, Real, or Complex

result: REAL(4)

SIGN Intrinsic Function SIGN(a, b). Returns absolute value of a times the sign of b. When SIGN is passed as an argument, a must be REAL(4). a: Integer or Real

b: same as a

result: same type as a

SNGL Intrinsic Function SNGL(a). Converts a double-precision argument to single-precision real type. a: REAL(8)

result: REAL(4)

TRANSFER Intrinsic Function TRANSFER(source, mold[, size]). Transforms first argument into type of second argument with (optional) size if array. source: any type

mold: any type

size: Integer

result: same type as mold

ZEXT Intrinsic Function ZEXT(x). Extends x with zeros. a: Logical or Integer

result: Default integer (usually INTEGER(4))