Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie question: val &= ~flags; 1

Status
Not open for further replies.

billbose

Programmer
Jan 15, 2001
66
0
0
US
what does the statement "val &= ~flags;" mean
 
[tt]val = val & ~flags;[/tt]
The ~ inverts all the bits in flags

So the result is that all the bits which were set in flags will now be clear in val.


--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top