BitSet.set

Sets or resets an lement by index.

Arguments

If

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

Return values

None

Complexity

Constant

Example

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