Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>clearbit()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CLEARBIT()
 Clears one or more bits within a number to zero
------------------------------------------------------------------------------
 Syntax

     CLEARBIT(<nLONG|cHexLONG>,<nBitPos1>,
        [...<nBitPos32>]) -->  nNewValue

 Arguments

     <nLONG|cHexLONG>  Designates either a decimal number or hexadecimal
     character string.

     <nBitPos32>  Designates the bit numbers to delete.

 Returns

     CLEARBIT() returns a value in which the designated bits are cleared.

 Description

     CLEARBIT() resets particular bits within a field to change something
     like a serial port register.  In contrast to NUMAND(), the bit numbers
     are given and do not need to be converted beforehand.  The value 1
     represents the bit with the lowest value, and the value 32, the bit with
     the highest value.

 Note

     .  An invalid parameter returns a result of -1.

 Example

     Bits 3, 4, and 6 are cleared in a bit pattern:

     nBitPattern  := 255
     nBitPattern  := CLEARBIT(nBitPattern, 3, 4, 6)   // Result:  211


See Also: ISBIT() SETBIT() NUMAND() NUMNOT() NUMOR() NUMXOR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson