std-setbit | ![]() |
std-setbit returns the new flag with the bitvalue val enabled.
It used to enable a setting in a flag, which is used to store independent logical values in a single integer number. It uses bit values and not bit positions because the online help for flags uses bit values too, such as the initget flag: 1,2,4,8,16,32,64,128
Same as (logior val flag)
(std-setbit 128 1) => 129
val: An integer number representing a bitvalue.
flag: A integer number representing a flag, a logical sum of bitvalues.
A integer number, the new flag.
None.
(std-require 'STDMATH)
Defined in STDMATH