Page 1 of 1

How to reset a binary flag?

Posted: Sat Jan 11, 2025 8:04 am
by AZJIO
Is that the only way?

Code: Select all

x = 5
flag = 5
flag = (flag | x) ! x
Debug flag

Re: How to reset a binary flag?

Posted: Sat Jan 11, 2025 8:23 am
by STARGĂ…TE
I do it with Value And Not Flag

Code: Select all

Define Value.i = 6
Define Flag.i = 4

Debug Bin(Value)

Value & ~Flag

Debug Bin(Value)

Re: How to reset a binary flag?

Posted: Sun Jan 12, 2025 9:53 am
by Fred
Yes that's the usual way to clear a flag