Gets the value of an integer with a specified bit cleared.
Syntax
Usage
result = BitReset( value, bit_number )
Parameters
value
The integer value.
bit_number
The index of the bit to clear.
Return Value
Returns the integer value with the specified bit cleared.
Description
This macro expands to a copy of the integer
value with the specified
bit_number cleared (to
off, or `
0`). Behaves as `
value And Not (1 Shl bit_number)`.
The valid range of values for
bit_number depends on the size, in bits, of `
TypeOf(value)`, which is `
0` through `
SizeOf(value) * 8 - 1`. See
Standard Datatype Limits for a table of the standard datatypes and their sizes.
Example
Print BitReset(5,0)
Print Hex(BitReset(&h8000000000000001,63))
will produce the output:
4
1
Dialect Differences
Differences from QB
See also