bitfirst()

Function groupExecute on clientPlatform(s)
Binary fieldNOAll

Syntax

bitfirst(binary)

Description

Returns the number of the most significant bit with value 1 in a binary field.

The following example sets lNumber to the bit number of the first bit set to 1. If all bits are zero, bitfirst() returns -1.

Example

Calculate
 
lNumber
 as 
bitfirst
(
lBinary
)