realbasic-nug
[Top] [All Lists]

Re: C conversion to RealBasic

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: C conversion to RealBasic
From: Yves Vindevogel <yves dot vindevogel at implements dot be>
Date: Wed, 31 Aug 2005 11:04:37 +0200
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <00c701c5ae08$e6a2fda0$0100000a at KEITHXP>
The & is a binary and, which you compare to the _LIST

Because you do a binary and on a mask, only a couple of bits are left, so it's no use doing the substraction

Eg.
11010110 is in controltype (214)
00001100 is in the mask (12)
the binary add gives you 00000100 (4)
that is checked against the _LIST, which should be 4 also (in integer value)

Binary and's and or's are in RB, just use them

On 31 Aug 2005, at 10:49, Keith Hutchison wrote:

( MIXERCONTROL_CT_CLASS_MASK &
MixerControl[0].dwControlType)==MIXERCONTROL_CT_CLASS_LIST

What would this be in RealBasic syntax?

Currently I have

controlType = mixerControl(0).dwControlType - MIXERCONTROL_CT_CLASS_MASK
and I'm checking controlType

Keith

_______________________________________________
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>


Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements



Mail: yves dot vindevogel at implements dot be  - Mobile: +32 (478) 80 82 91

Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76

Web: http://www.implements.be

First they ignore you. Then they laugh at you. Then they fight you. Then you win.
Mahatma Ghandi.
_______________________________________________
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>
<Prev in Thread] Current Thread [Next in Thread>