bittest()

Function group Execute on client Platform(s)
Binary Field NO All

Syntax

bittest(binary,firstbitnumber,lastbitnumber)

Description

Tests a range of bits (all bits with numbers >=firstBitNumber and <=lastBitNumber) in binary. binary must either be a binary field, or a long integer, you cannot use a function in the first argument. Returns a Boolean (true if at least one bit in the range is set).

If any are 1, the function returns 1, otherwise it returns zero.

Example

Calculate lStatus as bittest(lBinary,lFirstBitNumber,lLastBitNumber)