9.3.58 IAND (I, J)

Description:  Performs a logical AND on corresponding bits. This function can also be specified as AND.  
Class:  Elemental function; Generic 
Arguments:  I Must be of type integer.  
  J Must be of type integer with the same kind parameter as I.  
Results:  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 Section D.3

Specific Name  Argument Type  Result Type 
  INTEGER(1)  INTEGER(1) 
IIAND  INTEGER(2)  INTEGER(2) 
JIAND  INTEGER(4)  INTEGER(4) 
KIAND  INTEGER(8)  INTEGER(8) 

Examples

IAND (2, 3) has the value 2.

IAND (4, 6) has the value 4.


Previous Page Next Page Table of Contents