[Dev-C++] The & in a conditional statement.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel G. <sp...@ho...> - 2003-04-26 15:34:30
|
Hi, I'm using the Half Life SDK and am confused by the ampersand symbol, can
anyone explain what's happening please?
inline BOOL HasConditions( int iConditions ) { if ( m_afConditions &
iConditions ) return TRUE; return FALSE; }
I also notice we have return TRUE; return FALSE; I'm assuming this is
perfectly valid as in
if (condition)
return TRUE;
// if condition was true we would have exited by now.
return FALSE;
This isn;t relating to HL, it's just a general question about the
conditional statement. Is it something to do with bit masking?
_________________________________________________________________
Surf together with new Shared Browsing
http://join.msn.com/?page=features/browse&pgmarket=en-gb&XAPID=74&DI=1059
|