Ruud H.G. van Tol on Sat, 05 Jul 2025 21:19:25 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: flags in a bitmap



On 2025-07-05 20:37, Bill Allombert wrote:
[...]
I have made a updated version (which no more allow to clear the highest bit).

? ??bitclear
'bitclear' not found !

? ?bitset
bitset(~x,n): set bit n of x in place, assuming x >= 2^n.

? ?bitclear
bitclear(~x,n): clear bit n of x in place, assuming x >= 2^(n+1).

? ?bitflip
bitflip(~x,n): flip bit n of x in place, assuming x >= 2^{n+1}.


The brackets are {} vs ().

-- Ruud