HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure specifications
Chapter 11 559
Specific forms
BBCLR, HBCLR, IIBCLR, JIBCLR, KIBCLR.
IBITS(I, POS, LEN)
Description
Extracts a sequence of bits.
Class
Elemental function.
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.
Result type/
type parameters
Same as I.
Result value
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 model for the interpretation of an integer value as a sequence
of bits is in “The Bit Model” on page 508.
Specific forms
BBITS, HBITS, IIBITS, JIBITS, KIBITS.
IBSET(I, POS)
Description
Sets a bit to one.