Very nice!
Alan
>>>It
sounds to me like you want to clear the 3rd bit. So, BitClear(10,3). But if the 3rd bit(ie - 8) has already been cleared, then you will still have 10. BitClear(2,3) will return 2.
>>
>>Do I ? <s>
>>
>>Obviously, there are many values at runtime represented by constants. I need something where I don't actually have to look at the numbers and make decisions about which bit needs clearing. I just wondered if there was a straightforward way I could feed both values in and get the right result.
>
>
>bitand(nFlags, bitxor(nReset, 0xffffffff))
>
>
>>
>>Thanks anyway!
>>
>>Best