r = bitset(A, pos)
r = bitset(A, pos, val)
| Parameter | Description |
|---|---|
| A | an integer array. |
| pos | the bit position (1 is the least significant bit). |
| val | the bit value, 0 or 1 (default 1). |
| Parameter | Description |
|---|---|
| r | A with the bit at pos set to val. |
r = bitset(A, pos) sets the bit at position pos of A to 1.
r = bitset(A, pos, val) sets that bit to val.
bitset(uint8(0), 3)
| Version | Description |
|---|---|
| 2.0.0 | initial version |