IBITS(3I) Last changed: 1-6-98
NAMEIBITS - Extracts a sequence of bits
SYNOPSISIBITS ([I=]i, [POS=]pos, [LEN=]len)
IMPLEMENTATION
UNICOS, UNICOS/mk, and IRIX systems
STANDARDS
Fortran 90
DESCRIPTION
The IBITS intrinsic function extracts a sequence of bits. It accepts
the following arguments:
i Must be of type integer.
pos Must be of type integer. It must be nonnegative and pos + len
must be less than or equal to BIT_SIZE (i).
len Must be of type integer and nonnegative.
IBITS is an elemental function. The name of this intrinsic cannot be
passed as an argument.
RETURN VALUES
The result type and type parameter are the same as i. The result has
the value of the sequence of len bits in i beginning at bit pos
right-adjusted and with all other bits zero. The bit model defines
the model for 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
IBITS(14, 1, 3) has the value 7. In this example, the bits are
numbered from right to left, so they are extracted from right to left.
SEE ALSOMODELS(3I)
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.