bittest()

Function groupExecute on clientPlatform(s)
Binary fieldYESAll

Syntax

bittest(binary,firstbitnumber[,lastbitnumber=firstbitnumber])

Description

Tests a range of bits (all bits with numbers >=firstBitNumber and <=lastBitNumber) in binary.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.

When executing on the client, the binary argument must be a 32-bit integer variable (as binary variables are not sent to the client).

Example

Calculate
 
lStatus
 as 
bittest
(
lBinary
,
lFirstBitNumber
,
lLastBitNumber
)