Re: UInt32 and ==
Re: UInt32 and ==
- Subject: Re: UInt32 and ==
- From: Dan Crevier <email@hidden>
- Date: Tue, 09 Apr 2002 22:54:32 -0700
On 4/9/2002 7:07 PM, "Jaeho Chang" <email@hidden> wrote:
>
> - (Boolean) isReadable
>
> {
>
> return( ( auParamInfo.flags &
>
> kAudioUnitParameterFlag_IsReadable ) != 0 );
>
> }
>
>
I tried this:
>
- (Boolean) isReadable
>
{
>
return( auParamInfo.flags &
>
kAudioUnitParameterFlag_IsReadable != 0 );
>
}
>
>
But this did not work. I forgot that != is done before &.
>
This made me think the problem was in internal
>
comparing mechanism...
You are missing ()'s. What you wrote means:
return( auParamInfo.flags &
(kAudioUnitParameterFlag_IsReadable != 0) );
Which is effectively ANDing auParamInfo.flags and 1.
Dan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.