! (BitSet)

Sets or resets value of a bitset element by index.

Arguments

If

condition
is TRUE, set the element, otherwise, reset it.
index
is an integer number, zero-based. If the index is out of range, an error will occur.
bitset
is the bitset to an element of.

Return values

None

Complexity

Constant

Example

"sl/bitSet" useFile a: (1 3 5) 8 makeBitSet; 2 a @ print LF print TRUE 2 a ! 2 a @ print
Output:
FALSE TRUE