iand(3I)

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

As shipped in IRIX 6.5.30. Last changed in IRIX 6.5.19.

NAME
     IAND, IIAND, JIAND, KIAND,  IEOR, 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)

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.  On IRIX
     systems, the result can be affected by the -i option on the f90(1)
     command line.

     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
     f90(1)

     MODELS(3I)