9.51. BTEST

9.51 BTEST — Bit test function

Description:

BTEST(I,POS) returns logical .TRUE. if the bit at POS in I is set. The counting of the bits starts at 0.

Standard:

Fortran 95 and later, has overloads that are GNU extensions

Class:

Elemental function

Syntax:

RESULT = BTEST(I, POS)

Arguments:
I The type shall be INTEGER.
POS The type shall be INTEGER.
Return value:

The return value is of type LOGICAL

Example: