Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease 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!
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 November 21, 2024, 6:39 am This article has been viewed 35212 times.
|
|