g77.info: BTest Intrinsic

Go forward to CAbs Intrinsic
Go backward to Bit_Size Intrinsic
Go up to Table of Intrinsic Functions
Go to the top op g77

BTest Intrinsic

     BTest(I, POS)
BTest: `LOGICAL(KIND=1)' function.
I: `INTEGER'; scalar; INTENT(IN).
POS: `INTEGER'; scalar; INTENT(IN).
Intrinsic groups: `mil', `f90', `vxt'.
Description:
   Returns `.TRUE.' if bit POS in I is 1, `.FALSE.' otherwise.
   (Bit 0 is the low-order (rightmost) bit, adding the value 2**0, or 1,
to the number if set to 1; bit 1 is the next-higher-order bit, adding
2**1, or 2; bit 2 adds 2**2, or 4; and so on.)
   *Note Bit_Size Intrinsic::, for how to obtain the number of bits in
a type.  The leftmost bit of I is `BIT_SIZE(I-1)'.