eqv(3I)
EQV - Computes logical equivalence
As shipped in IRIX 6.5.15. Added in IRIX 6.5.5.
NAME EQV - Computes logical equivalence SYNOPSIS EQV ([I=]i,[J=]j) IMPLEMENTATION UNICOS, UNICOS/mk, IRIX systems CF90, MIPSpro 7 Fortran 90 STANDARDS Fortran extension DESCRIPTION EQV is an elemental function. It accepts the following arguments: i Must be of type Boolean, integer, real, logical, or Cray pointer. j Must be of type Boolean, integer, real, logical, or Cray pointer. j need not be the same type as i, but j must be the same size as i. NOTES EQV is outmod. Refer to the Fortran Language Reference Manual, Volume 3, for information about outmoded features and their preferred standard alternatives. The name of this intrinsic cannot be passed as an argument. RETURN VALUES When given two arguments of type Boolean, real, integer, or pointer, EQV computes a bit-wise logical equivalence and returns a Boolean (on UNICOS and UNICOS/mk systems) or integer (on IRIX systems) result. When both i and j are of type logical, the result is of type logical. The following tables show both the logical equivalence and bit-wise logical equivalence: ----------------------------------------------------------------- Logical Logical (Logical Variable 1) EQV Variable 1 Variable 2 (Logical Variable 2) ----------------------------------------------------------------- T T T T F F F T F F F T ----------------------------------------------------------------- -------------------------------------------------------------- Bit of Bit of (Bit of Variable 1) EQV Variable 1 Variable 2 (Bit of Variable 2) -------------------------------------------------------------- 1 1 1 1 0 0 0 1 0 0 0 1 -------------------------------------------------------------- EXAMPLES The following section of Fortran code shows the EQV function used with two arguments of type logical: LOGICAL L1, L2, L3 ... L3 = EQV(L1,L2) The following section of Fortran code shows the EQV function used with two arguments of type integer. The bit patterns of the arguments and result are also given. For clarity, only the rightmost 8 bits are shown. INTEGER I1, I2, I3 I1 = 12 I2 = 10 ... I3 = EQV(I1,I2) ------------------------------- ------------------------------- | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | ------------------------------- ------------------------------- I1 I2 ------------------------------- | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | ------------------------------- I3 SEE ALSO Intrinsic Procedures Reference Manual for the printed version of this man page.