Software Venture Consulting
ToMarket

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Brian Dunning
Contact me | vCard


Brian on CNN
Brian on CNN


Brian on CBS Radio


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 FileMaker Pro Custom Functions

Search  |  List  |  Show Random  |  Upload  |  Add This to Your Site

BitTest2 ( value ; bit )

Stephen Drake, Synergy
n/a

Checks whether bit 'bit' in value 'value' is on or off

Sample Input:
33 ; 5
Sample Output:
1


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

if you have myFMbutler's Clip Manager installed

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

digg this page | del.icio.us this page

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. PVofFV ( FutureVal , Interest , Term )
  (Sat, May 10, 6:52pm)
2. Edate ( thedate ; months )
  (Sat, May 10, 5:21pm)
3. FormatDate( DatetoFormat )
  (Thu, May 08, 6:05pm)

RSS Feed of Custom Functions

Quick Poll...
Are you mainly Mac
or mainly Windows?
 • Mac
 • Windows
View the answers

ToMarket

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