You're right; my test code was wrong, but testing the i==32 case my code still works. It shifts the mask by 0 bits, leaving all bits set.
(~0u) and 0xffffffffu will have the same value (all-bits-one) as long as int is 32 bits (true on all our platforms). The former may be easier on the eyes (less chance of typing only 6 "f"s instead of 8!) Jeff ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers