BitTest2 ( value ; bit )
Rate this function: Average rating: 3.3 (7 votes) Discuss this Custom Function
Stephen Drake, Synergy
n/a
Checks whether bit 'bit' in value 'value' is on or off
Sample Input:
|
Sample Output:
|
Description:
A non-recursive alternative to BitTest.
Bits are numbered from zero.
Div ( value ; 2 ^ bit ) is odd if the tested bit is set,
lower bits that are set add zero to the result,
higher bits that are set add an even number to the result.
If required, you could add error checking to make sure bit and value are >= 0.
Alternatively, you can use the function as is to test bits in the fractional part of the value or to test negative values.
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
This is my Custom Function and I want to
edit it
Discuss:There are no comments yet. Be the first to post a comment about this Custom Function! Please try to keep it brief & to the point. Anyone can post:
|
Newest Custom Functions:
| 1. |
GroupRelationInfo ( FileTarget ; TableTarget ; Result ) |
| |
(Tue, Mar 16, 5:57am) |
| 2. |
GeoBox(latitude;longitude; radius) |
| |
(Mon, Mar 15, 11:04am) |
| 3. |
MonthNameList ( start; number; short ) |
| |
(Sun, Mar 14, 11:45pm) |
| 4. |
matchListAB( ListA ; ListB; match_Value; match_operator ; getN ) |
| |
(Sun, Mar 14, 10:29pm) |
| 5. |
Bin2Hex ( binary ) |
| |
(Sat, Mar 13, 10:08pm) |
| 6. |
SlideView (text) |
| |
(Sat, Mar 13, 8:40pm) |
| 7. |
HashFNV1a64 ( text ; empty ) |
| |
(Sat, Mar 13, 6:23pm) |
| 8. |
HashFNV1a32 ( text ; empty ) |
| |
(Sat, Mar 13, 5:55pm) |
 |
|