Documentation

Added in v3.27

bitset

Syntax: %bitset(i,bitnum,value)
Related: %bittest

Set or reset a bit within a numeric value and return the new numeric value. If value is omitted, 1 (true) is used to set the bit. To reset a bit, the value must be zero.

Example

#SHOW %bitset(0,3)
4
#SHOW %bitset(255,3,0)

251

Add comment

Login or register to post comments