> What happens is that the "~bitmask" is done in the *narrower* type, > and then - because the narrower type is unsigned - the cast to the > wider type is done as an *unsigned* cast, so what you *think* happens > is that it clears the bits that are set in "bitmask", but what > *actually* happens is that yes, you clear the bits that are set in > :bitmask", but you *also* clear the upper bits of value. If the narrower type is signed it is probably even more confusing! The high bits will be preserved unless you are masking off bit 31. David ��.n��������+%������w��{.n�����{�����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f