Navigation bar
  Start Previous page
 105 of 283 
Next page End 100 101 102 103 104 105 106 107 108 109 110  

96
GetBit
Type
Function returning Byte
Invocation
GetBit(var, bitNumber)
Parameter
Method
Type
Description
var
ByRef
any type
The variable from which the bit will be read.
bitNumber
ByVal
int8/16
The bit number to read.
Discussion
This function extracts a single bit from memory beginning at the location of the specified variable.  Bit
numbers 0-7 are taken from the byte at the specified location, bit numbers 8-15 are taken from the
subsequent byte, etc.  In each case, the lower bit number corresponds to the least significant bit of the
byte while the higher bit number corresponds to the most significant bit.
The return value will always be 0 or 1.
Compatibility
In BasicX compatibility mode the second parameter must be a Byte type.
See Also
Previous page Top Next page