mod(3F) mod(3F)
NAME
mod, amod, dmod, jmod, imod - Fortran remaindering intrinsic
functions
SYNOPSIS
integer i, j, k
integer*2 i2, j2, k2
real r1, r2, r3
double precision dp1, dp2, dp3
k = mod(i, j)
k = jmod(i, j)
k2 = mod(i2, j2)
k2 = imod(i2, j2)
r3 = mod(r1, r2)
r3 = amod(r1, r2)
dp3 = mod(dp1, dp2)
dp3 = dmod(dp1, dp2)
DESCRIPTION
mod returns the integer remainder of its first argument
divided by its second argument. amod and dmod return,
respectively, the real and double-precision whole number
remainder of the integer division of their two arguments.
The generic version mod will return the data type of its
arguments.
The functions jmod and imod have been included to provide
compatibility with other vendors and are not recommended for
general use. If the second argument of any of these func-
tions is zero, then the function generates a floating excep-
tion.
Page 1 CX/UX Hf77 Fortran Reference Manual