Operation Functions(3.1)

The functions described in this section are used to perform operations on variables of the bitset type.

bitIsSet and bitIsCleared

The bitIsSet and bitIsCleared functions evaluate whether an individual bit is set or cleared. This can be done against either an integer, or a bitset value. For integer type, these are convenience functions that can be used instead of the regular logical operators.

boolean bitIsCleared
( int|bitset value,
int bitnumber )
boolean bitIsSet
( int|bitset value,
int bitnumber )
ParameterDescription

value

Bitset or integer to evaluate

bitnumber

The bit to evaluate. 0 (zero) is the least significant bit, 31 is the most significant.

Returns

false or true

bsCreate

The bsCreate function creates an empty bitset.

bitset bsCreate()
ParameterDescription

Returns

An (empty) bitset

bsSet and bsClear

The bsSet and bsClear functions set or clear a bit in a bitset.

void bsClear
( bitset bitset, int bitnumber )
void bsSet ( bitset bitset,
int bitnumber )
ParameterDescription

bitset

The bitset to modify

bitnumber

The bit to change. 0 (zero) is the least significant bit, 31 is the most significant.

Returns

Nothing