I'm trying to get the same functionality of these C++ routines in Rb. //#define SET_BIT(word,bit_flag) ((word)=((word) | (bit_flag)))
For this I have word = Bitwise.BitOr(word, bit_flag) Correct? //#define RESET_BIT(word,bit_flag) ((word)=((word) & (~bit_flag))) For this I see no equivalent in Rb for the ~ (tilda) operator which produces an integer with all of the bits set to 1, except the bit that originally was set to 1, that bit becomes a 0. Any help? Thanks! -- Thomas C. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
