SD - The Open Source, Multivalue, String, Database


The BITSET() function turns on a specified bit in an integer value.

Format:     BITSET(expr, bit)

Parameters:

     expr       evaluates to the value in which the bit is to be set.
     bit          evaluates to the bit position (0 to 31).

The BITSET() function converts expr to a 32 bit integer and turns on (sets to 1) the bit identified by bit to form a new integer value as the result. Bits are numbered from 0 to 31 from the least significant end of the value. The effect of this function with a bit value outside this range is undefined.

Example:

FLAGS = BITSET(FLAGS, 2)

This statement turns on bit 2 in the FLAGS variable.

See also:     BITAND(), BITNOT(), BITOR(), BITRESET(), BITTEST(), BITXOR(), SHIFT()

SD Basic Functions - BITSET()

OpenQM 2.6.6 documentation for this command is available here.  The OpenQM documentation may provide additional context for this command.  However, some features in SD have been modified so the OpenQM information may not be 100% applicable to SD.