⚙️bits
This type represents a bitset value.
Maximal bit number for this type is 63. Setting or getting any bits outside of that range will cause a crash.
reset
Method
Resets the value.
Arguments
None.
Returns
Nothing.
Example
bits:reset();get_raw
Method
Returns the raw value.
Arguments
None.
Returns
Type
Description
int
Raw value.
Example
set_raw
Method
Sets the raw value.
Arguments
Name
Type
Description
val
int
Raw value.
Returns
Nothing.
Example
none
Method
Returns true if no bits are set.
Arguments
None.
Returns
Type
Description
bool
true if no bits are set.
Example
set
Method
Enables a bit.
Arguments
Name
Type
Description
bit
int
Bit number.
Returns
Nothing.
Example
unset
Method
Disables a bit.
Arguments
Name
Type
Description
bit
int
Bit number.
Returns
Nothing.
Example
get
Method
Returns bit state.
Arguments
Name
Type
Description
bit
int
Bit number.
Returns
Type
Description
bool
Bit status.
Example
toggle
Method
Toggles bit state.
Arguments
Name
Type
Description
bit
int
Bit number.
Returns
Nothing.
Example
Last updated