Raised This Month: $ Target: $400
 0% 

variables


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
FiFiX
Senior Member
Join Date: May 2008
Location: Poland
Old 08-15-2013 , 07:32   variables
Reply With Quote #1

Can someone explain to me how does variables like that works?

Definition:
Code:
#define VOTE_IN_PROGRESS    1
#define VOTE_FORCED            2
#define VOTE_IS_RUNOFF        4
#define VOTE_IS_OVER         8
#define VOTE_IS_EARLY        16
#define VOTE_HAS_EXPIRED    32
#define VOTE_OUTCOME        64
Usage:
check: g_voteStatus & VOTE_IS_RUNOFF
add: g_voteStatus |= VOTE_IS_RUNOFF
remove: g_voteStatus |= ~VOTE_IS_RUNOFF

f.e. If I'll add VOTE_OUTCOME to g_voteStatus it will be 64. It means that previous variables are already inside g_voteStatus?
g_voteStatus |= VOTE_IS_OUTCOME
and g_voteStatus & VOTE_IS_OVER will return true?
FiFiX is offline
Send a message via Skype™ to FiFiX
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode