Fortran Wiki
ibits

Description

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).

Standard

Fortran 95 and later

Class

Elemental function

Syntax

result = ibits(i, pos, len)

Arguments

  • i - The type shall be integer.
  • pos - The type shall be integer.
  • len - The type shall be integer.

Return value

The return value is of type integer and of the same kind as i.

See also

bit_size, ibclr, ibset, iand, ior, ieor

category: intrinsics