Topic complex |
Numerical functions |
Function |
testbit() |
Short |
Checks if a Bit is set |
Syntax |
TESTBIT(x,n : INTEGER) : INTEGER |
Parameter |
x : whole number
n : 0..31 (in 32-Bit-Version)
0..63 (in 64-Bit-Version) |
Return |
1, if the Bit n is set
0, if the Bit n is not set |
See also: |
|
Description |
For n is valid:
0 -> lowest-ordered Bit
31 (resp. 63) -> highest-ordered Bit
TESTBIT(255,0) = 1
TESTBIT(256,0) = 0
|
Write a comment:
|