[fpc-devel] tbits.NotBits

Andrea Mauri andrea.mauri.75 at gmail.com
Fri Mar 31 15:58:22 CEST 2017


one last thing, using TBits it is possible to SetIndex in order to start 
from a predefined index when using FindNextBit and FindPrevBit
Anyway it is possible to set the State only using FindFirstBit, so I 
cannot use FindNextBit only using SetIndex but I have to call also 
FindFirstBit.
Is it possible to introduce a SetState procedure?
Thanks again,
Andrea Mauri

Il 31/03/2017 14:10, Andrea Mauri ha scritto:
> one more thing.
> there is a method like clearall to set all bits to 1?
> clearall is much more faster then a simple iteration along all bits
>
> Il 31/03/2017 14:07, Andrea Mauri ha scritto:
>> I didn't understand how TBits.NotBits works.
>> Consider the following code:
>>
>>
>>   b:= TBits.Create(NRECORDS);
>>   b.NotBits(b);
>>
>> or more clear:
>>
>>   b:= TBits.Create(NRECORDS);
>>   b.Clearall;
>>   b.NotBits(b);
>>
>> I supposed that all bits of b will be 1. What I obtain is that all bits
>> are 0.
>>
>> fpc 3.0.0 win64
>>
>> Am I missing something?
>> Thank you.
>> Andrea Mauri



More information about the fpc-devel mailing list