Checks whether bit 'bit' in value 'value' is on or off
Sample Input:
33 ; 5
Sample Output:
1
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.
Become a successful software entrepreneur. Click
here.
Custom Function Authors:
Link to all of your own custom functions on this site with the following URL:
http://www.briandunning.com/filemaker-custom-functions/results.php?author=Your
Name Here