Next: , Previous: Bit_Size Intrinsic, Up: Table of Intrinsic Functions


8.11.9.34 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 or 1, to the number if set to 1; bit 1 is the next-higher-order bit, adding or 2; bit 2 adds or 4; and so on.)

See Bit_Size Intrinsic, for how to obtain the number of bits in a type. The leftmost bit of I is `BIT_SIZE(I-1)'.