Difference between revisions of "BITCLEAR()"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to clear a specified bit in a numeric value | Function to clear a specified bit in a numeric value | ||
− | |||
==Syntax== | ==Syntax== | ||
BITCLEAR(<expN1>,<expN2>) | BITCLEAR(<expN1>,<expN2>) | ||
− | |||
==See Also== | ==See Also== | ||
[[BITAND()]], [[BITLSHIFT()]], [[BITNOT()]], [[BITOR()]], [[BITRSHIFT()]], [[BITSET()]], [[BITTEST()]], [[BITXOR()]] | [[BITAND()]], [[BITLSHIFT()]], [[BITNOT()]], [[BITOR()]], [[BITRSHIFT()]], [[BITSET()]], [[BITTEST()]], [[BITXOR()]] | ||
− | |||
==Description== | ==Description== | ||
The BITCLEAR() function clears the specified bit <expN2> in a numeric value <expN1> and returns the new value. If <expN1> and <expN2> are not integers, they will be converted to integer values before the clear takes place. The bit position, <expN2>, can range from 0 (rightmost bit) to 31. | The BITCLEAR() function clears the specified bit <expN2> in a numeric value <expN1> and returns the new value. If <expN1> and <expN2> are not integers, they will be converted to integer values before the clear takes place. The bit position, <expN2>, can range from 0 (rightmost bit) to 31. | ||
− | |||
==Example== | ==Example== | ||
Line 22: | Line 18: | ||
4 && 0100 | 4 && 0100 | ||
</code> | </code> | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | [[Category: | + | [[Category:Numeric Data Functions]] |
− | + |
Latest revision as of 08:45, 4 February 2013
Contents
Purpose
Function to clear a specified bit in a numeric value
Syntax
BITCLEAR(<expN1>,<expN2>)
See Also
BITAND(), BITLSHIFT(), BITNOT(), BITOR(), BITRSHIFT(), BITSET(), BITTEST(), BITXOR()
Description
The BITCLEAR() function clears the specified bit <expN2> in a numeric value <expN1> and returns the new value. If <expN1> and <expN2> are not integers, they will be converted to integer values before the clear takes place. The bit position, <expN2>, can range from 0 (rightmost bit) to 31.
Example
x = 6 && 0110 y = 1 ? bitclear(x,y) 4 && 0100