` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Bit manipulation (BAND)
2000-12-20 -- Tom Leech
 
Some time ago I wrote a little function that given the mask and the particular bit position you wanted to check, the function returns true if a 1 is in that bit or false if its 0. CompareMask PROCEDURE (msk,indx) ReturnValue Byte MIndex long CODE MIndex = Bshift(1,Indx-1) ! Shift a 1 into the proper position (base 0) if Band(msk,MIndex) = Mindex ! If in mask and equals Mindex then TRUE ReturnValue = TRUE else ReturnValue = FALSE end


Today is May 8, 2024, 5:09 pm
This article has been viewed 35121 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: