Tests a bit of an integer value.
Elemental function
The result is of type default logical.
The result has the value .TRUE. if bit POS of I has the value 1 and the value .FALSE. if bit POS of I has the value 0.
The bits are numbered from 0 to BIT_SIZE(I)-1, from right to left.
If A has the value
| 1 2 |
| 3 4 |
the value of BTEST (A, 2) is
| false false |
| false true |
and the value of BTEST (2, A) is
| true false |
| false false |
See Integer bit model.
Specific Name | Argument Type | Result Type | Pass As Arg? |
---|---|---|---|
BTEST 1 | any integer | default logical | yes |