Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bitwise function(s) Question -- Again!
Message
From
13/11/2002 15:26:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Bitwise function(s) Question -- Again!
Miscellaneous
Thread ID:
00722339
Message ID:
00722339
Views:
58
Hi!

If I do :-
nFlags = Bitor(8,2)
I get 10.

If I want to take the value of 8 out of the nFlags value, apart from simply substracting its value, how do I do this with one of the bitwise functions? Obviously, this is a simple example but I have a running nFlags value and if any of the flag conditions become obsolete, I want to remove (subtract) the obsolete value from the running flags total, preferably without having to test that the flag total even includes the value in need of subtraction. In other words, if I want to take the value of 8 from an nFlags value of 10, the nFlags value is corrected (to 2). However, if the value has already been removed and nFlags already == 2, then the action of trying to remove a value (ie., 8) that has already been removed from nFlags is processed, while still leaving the nFlags at 2 (because it had already been reduced).

I hope you understand that!

Thanks.
-=Gary
Next
Reply
Map
View

Click here to load this message in the networking platform