function AddFlags(OldFlags as dword, Flags as dword)
NewFlags = OldFlags||Flags
endfunction NewFlags
function RemoveFlags(OldFlags as dword, Flags as dword)
RemovableFlags = OldFlags && Flags
NewFlags = OldFlags ~~ RemovableFlags
endfunction NewFlags
I was having trouble with removing flags using operators and not using subtraction which can cause errors. The above code with work with multiple flags all at once.
Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!