Tests a bit of an integer value.
Class
Elemental function
Result Type and Attributes
The result is of type default logical.
Result Value
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.
Examples
BTEST (8, 3) has the value .TRUE..
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 |
Notes: