From: "James Allan Ventura" Subject: Newbie question: Need help finding a particular C keyword To: djgpp AT delorie DOT com X-Mailer: CommuniGate Pro Web Mailer v.3.2.4 Date: Sun, 18 Mar 2001 12:40:32 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Reply-To: djgpp AT delorie DOT com Hi, I'm trying to modify a source code written in Microsoft C so that I can compile it using GCC. Now I got stuck modifying the code. In the code, I declared two integer variables. int computedChecksum=0; int recordChecksum=0; Then, somewhere in the program I wanted to test the equality of these two variables. if (computedChecksum==recordChecksum) But, I wanted to test the equality of the two least significant digits of the variable computedChecksum and the variable recordChecksum. The variable recordChecksum has only two significant digits. I run the code using a test file and the computedChecksum has a value of FFFFFCFCh while recordChecksum has a value of FCh. Now, I'm only interested in the two least significant digits of computedChecksum which in this case is FCh. And then test it for equality to recordChecksum which has a value of FCh also. Is there a C keyword that will allow me to drop(discard) all but the two least significant digits of computedChecksum? Or is there better way to go over this. Thank you for any help you can extend to me. Regards, James ____________________________________________________________________ **** Get your free E-Mail account at WWW.DIGITELONE.COM ****