iand

Date:

10-12-2011

NAME

IAND, IIAND, JIAND, KIAND, IEOR, IIEOR, JIEOR, KIEOR, IOR, IIOR, JIOR, KIOR - Performs a logical AND, an exclusive OR, or an inclusive OR

SYNOPSIS

IAND ([I=]i, [J=]j)
IIAND ([I=]i, [J=]j)
JIAND ([I=]i, [J=]j)
KIAND ([I=]i, [J=]j)
IEOR ([I=]i, [J=]j)
IIEOR ([I=]i, [J=]j)
JIEOR ([I=]i, [J=]j)
KIEOR ([I=]i, [J=]j)
IOR ([I=]i, [J=]j)
IIOR ([I=]i, [J=]j)
JIOR ([I=]i, [J=]j)
KIOR ([I=]i, [J=]j)

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

Fortran

Fortran extensions: IIAND, JIAND, KIAND, IIEOR, JIEOR, KIEOR, IIOR, JIOR, KIOR

DESCRIPTION

The IAND, IIAND, JIAND, and KIAND intrinsic functions perform a logical AND.

The IEOR, IIEOR, JIEOR, and KIEOR intrinsic functions perform an exclusive OR.

The IOR, IIOR, JIOR, and KIOR intrinsic functions perform an inclusive OR.

They accept the following arguments:

i

Must be of type INTEGER.

  • For IIAND, must be of type INTEGER(KIND=2).

  • For JIAND, must be of type INTEGER(KIND=4).

  • For KIAND, must be of type INTEGER(KIND=8).

  • For IIEOR, must be of type INTEGER(KIND=2).

  • For JIEOR, must be of type INTEGER(KIND=4).

  • For KIEOR, must be of type INTEGER(KIND=8).

  • For IIOR, must be of type INTEGER(KIND=2).

  • For JIOR, must be of type INTEGER(KIND=4).

  • For KIOR, must be of type INTEGER(KIND=8).

j

Must be of type INTEGER with the same kind type parameter as i.

These are elemental functions. The names of these intrinsics cannot be passed as arguments.

RETURN VALUES

The result type and type parameter are the same as i.

For IAND, IIAND, JIAND, and KIAND, the result has the value obtained by combining i and j bit-by-bit according to the following truth table:

-------------------------
i      j      IAND(i,j)
-------------------------
1      1      1
1      0      0
0      1      0
0      0      0
-------------------------

For IEOR, IIEOR, JIEOR, and KIEOR, the result has the value obtained by combining i and j bit-by-bit according to the following truth table:

-------------------------
i      j      IEOR(i,j)
-------------------------
1      1      0
1      0      1
0      1      1
0      0      0
-------------------------

For IOR, IIOR, JIOR, and KIOR, the result has the value obtained by combining i and j bit-by-bit according to the following truth table:

------------------------
i      j      IOR(i,j)
------------------------
1      1      1
1      0      1
0      1      1
0      0      0
------------------------

The bit model defines the interpretation of an integer value as a sequence of bits. For more information on the bit model, see the models(3i) man page.

EXAMPLES

Example 1. IAND(1,3) yields 1.

Example 2. IEOR(1,3) yields 2.

Example 3. IOR (1,3) yields 3.

SEE ALSO

ftn(1)

models(3i)