realbasic-nug
[Top] [All Lists]

Re: Bit testing?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Bit testing?
From: Charles Yeomans <charles at declareSub dot com>
Date: Sun, 30 Mar 2008 12:15:55 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <F042767B-70D8-4BEA-B905-8221C70FAB37 at mac dot com>
On Mar 30, 2008, at 12:13 PM, Alfred Van Hoek wrote:

> I am a lay when it comes to using the Bitwise class, but in C I do
>
>       if (state & kConstant) {
>       }
>
> Just looking for a particular bit in state, but the Bitwise class is
> giving a result I do not understand:
>
> if (state And kConstant) = 1 then ....
>
> is that the correct interrogation? (It returns a value that I do not
> understand, and the language doc/reference is not comprehensible....)
>
> Alfred

You want if (state And kConstant) = kConstant then ....

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>