SD - The Open Source, Multivalue, String, Database
The BITTEST() function tests the state of a specified bit in an integer value.
Format: BITTEST(expr, bit)
Parameters:
expr evaluates to the value in which the bit is to be tested.
bit evaluates to the bit position (0 to 31).
The BITTEST() function converts expr to a 32 bit integer and tests the state of the bit identified by bit, returning true (1) if it is set and false (0) if it is reset. 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:
IF BITTEST(FLAGS, 2) THEN DISPLAY(IT$CS) :
This statement clears the screen if bit 2 is set in the FLAGS variable.
See also: BITAND(), BITNOT(), BITOR(), BITRESET(), BITSET(), BITXOR(), SHIFT()
SD Basic Functions - BITTEST()
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.