ibits(3f) - [FORTRAN:INTRINSIC:BIT MANIPULATION] Bit extraction
result = ibits(i, pos, len)
IBITS extracts a field of length LEN from I, starting from bit position POS and extending left for LEN bits. The result is right-justified and the remaining bits are zeroed. The value of pos+len must be less than or equal to the value bit_size(i).
I The type shall be INTEGER. POS The type shall be INTEGER. A value of zero refers to the least significant bit. LEN The type shall be INTEGER.
The return value is of type INTEGER and of the same kind as I.
[[Fortran 95]] and later
[[Elemental procedure|Elemental function]]
bit_size(3), ibclr(3), ibset(3), iand(3), ior(3), ieor(3)
ibits (3) | March 11, 2021 |