std-bitsetp | ![]() |
std-bitsetp returns T if all the 1 bits in bitvalue val are set in flag, NIL otherwise.
It used to check settings 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 (/= (rem flag val) 0) or (= (logand val flag) val)
(std-bitsetp 4 12) => T
because the third bit (4 = 0*2^0 + 0*2^1 + 1*2^2)
is also set in 124: [0100] 12: [1100]
val: An integer number representing a bitvalue.
flag: A integer number representing a flag, a logical sum of bitvalues.
T or NIL.
None.
(std-require 'STDMATH)
Defined in STDMATH