W dniu 2022-02-21 o 13:34, gabor via fpc-pascal pisze:
W dniu 2022-02-21 o 13:18, Ryan Joseph via fpc-pascal pisze:
Oh my, I was confusing my terms I think. I wanted to do bit masking (I
think it's called). I was expecting there to be something like
TestFlag in the RTL since I can never rememb
On Mon, 21 Feb 2022 13:34:29 +0100
gabor via fpc-pascal wrote:
> W dniu 2022-02-21 o 13:18, Ryan Joseph via fpc-pascal pisze:
> > Oh my, I was confusing my terms I think. I wanted to do bit masking
> > (I think it's called). I was expecting there to be something like
> > TestFlag in the RTL since
> On Feb 21, 2022, at 7:31 PM, Michael Van Canneyt via fpc-pascal
> wrote:
>
> Hm. I'm not sure that this code does what you need.
>
> But masking is indeed not in the helpers.
>
Try it yourself, it does indeed work. How else are you supposed to test these
kinds of bit flag APIs where all
W dniu 2022-02-21 o 13:18, Ryan Joseph via fpc-pascal pisze:
Oh my, I was confusing my terms I think. I wanted to do bit masking (I think it's
called). I was expecting there to be something like TestFlag in the RTL since I can never
remember the syntax "Value = (Value or Index)"
function Tes
On Mon, 21 Feb 2022, Ryan Joseph via fpc-pascal wrote:
On Feb 21, 2022, at 7:01 PM, Michael Van Canneyt via fpc-pascal
wrote:
Yes, this is testbit.
Why do you say it does not work ?
Oh my, I was confusing my terms I think. I wanted to do bit masking (I think it's
called). I was expec
> On Feb 21, 2022, at 7:01 PM, Michael Van Canneyt via fpc-pascal
> wrote:
>
> Yes, this is testbit.
>
> Why do you say it does not work ?
Oh my, I was confusing my terms I think. I wanted to do bit masking (I think
it's called). I was expecting there to be something like TestFlag in the RT
On Mon, 21 Feb 2022, Ryan Joseph via fpc-pascal wrote:
I tried to use the bit helpers like
https://www.freepascal.org/docs-html/rtl/sysutils/twordhelper.testbit.html
but the bit to test is 0..15.
There are only 16 bits in a word, so that is correct.
I expected this to work like
https://wi
I tried to use the bit helpers like
https://www.freepascal.org/docs-html/rtl/sysutils/twordhelper.testbit.html but
the bit to test is 0..15. I expected this to work like
https://wiki.freepascal.org/Bit_manipulation but that doesn't seem to be the
case.
Does there exist bit helpers like GetBi