ibits(3I)
IBITS, IIBITS, JIBITS, KIBITS - Extracts a sequence of bits
As shipped in IRIX 6.5.5. Last changed in IRIX 6.5.5.
NAME IBITS, IIBITS, JIBITS, KIBITS - Extracts a sequence of bits SYNOPSIS IBITS ([I=]i, [POS=]pos, [LEN=]len) IIBITS ([I=]i, [POS=]pos, [LEN=]len) JIBITS ([I=]i, [POS=]pos, [LEN=]len) KIBITS ([I=]i, [POS=]pos, [LEN=]len) IMPLEMENTATION UNICOS, UNICOS/mk, IRIX systems CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77 STANDARDS Fortran Fortran extensions: IIBITS, JIBITS, KIBITS DESCRIPTION The IBITS, IIBITS, JIBITS, and KIBITS intrinsic functions extract a sequence of bits. They accept the following arguments: i Must be of type integer. For IIBITS, must be of type integer (KIND=2). For JIBITS, must be of type integer (KIND=4). For KIBITS, must be of type integer (KIND=8). 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. These are elemental intrinsic functions. The names of these intrinsics cannot be passed as arguments. 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 ALSO MODELS(3I) Intrinsic Procedures Reference Manual for the printed version of this man page.