dim(3I)
DIM, DDIM, QDIM, IDIM, IIDIM, JIDIM, KIDIM - Computes positive difference of two numbers
As shipped in IRIX 6.5.15. Added in IRIX 6.5.5.
NAME DIM, DDIM, QDIM, IDIM, IIDIM, JIDIM, KIDIM - Computes positive difference of two numbers SYNOPSIS DIM ([X=]x,[Y=]y) DDIM ([X=]x,[Y=]y) QDIM ([X=]x,[Y=]y) IDIM ([X=]x,[Y=]y) IIDIM ([X=]x,[Y=]y) JIDIM ([X=]x,[Y=]y) KIDIM ([X=]x,[Y=]y) IMPLEMENTATION UNICOS, UNICOS/mk, IRIX systems CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77 STANDARDS Fortran Fortran extensions: QDIM, IIDIM, JIDIM, KIDIM DESCRIPTION DIM is the generic function name; the others are specifics. These are elemental intrinsic functions. They accept the following arguments: x Must be of type integer or real. y Must be of the same type and kind type as x. These functions solve for: R = x - x , if x > x 1 2 1 2 R = 0, if x <= x 1 2 NOTES The DIM, IDIM, and DDIM intrinsic funtion names can be passed as arguments; the others cannot. RETURN VALUES DIM evaluates two real numbers and subtracts them. The result is a real positive difference. DDIM evaluates two double-precision real numbers and subtracts them. The result is a double-precision real positive difference. QDIM evaluates two quad-precision real numbers and subtracts them. The result is a quad-precision real positive difference. IDIM evaluates two integers and subtracts them. The result is an integer positive difference. IIDIM evaluates two integer (KIND=2) numbers and subtracts them. The result is an integer (KIND=2) positive difference. JIDIM evaluates two integer (KIND=4) numbers and subtracts them. The result is an integer (KIND=4) positive difference. KIDIM evaluates two integer (KIND=8) numbers and subtracts them. The result is an integer (KIND=8) positive difference. EXAMPLES The following program shows the use of IDIM to compute the positive difference between the integers 77 and 10: PROGRAM DIMTEST INTEGER A,B,C,D,E A = 77 B = 10 C = IDIM(A,B) WRITE 1,A,B,C 1 FORMAT(I2,'POSITIVE DIFFERENCE ',I2,' EQUALS ', I2) D = IDIM(B,A) WRITE 2,B,A,D 2 FORMAT(I2,'POSITIVE DIFFERENCE ',I2,' EQUALS ',I2) STOP END The example program gives the following output: 77 POSITIVE DIFFERENCE 10 EQUALS 67 10 POSITIVE DIFFERENCE 77 EQUALS 0 SEE ALSO Intrinsic Procedures Reference Manual for the printed version of this man page.