Elemental Intrinsic Function (Generic): Performs a logical AND on corresponding bits. This function can also be specified as AND.
result = IAND (i,j)
i |
(Input) Must be of type integer or of type logical (which is treated as an integer). |
j |
(Input) Must be of type integer or logical with the same kind parameter as i. If the kinds of i and j do not match, the value with the smaller kind is extended with zeros on the left and the larger kind is used for the operation and the result. |
The result type is the same as i. The result value is derived 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
The model for the interpretation of an integer value as a sequence of bits is shown in Model for Bit Data.
IAND (2, 3) has the value 2.
IAND (4, 6) has the value 4.