• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UInt32 and ==
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UInt32 and ==


  • Subject: Re: UInt32 and ==
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 9 Apr 2002 16:02:30 +0200

On Tuesday, April 9, 2002, at 03:46 , Jaeho Chang wrote:

This is not a Cocoa question, but may be Obj-C specific...
(or may be a very basic problem that I'm missing...)

Question:

auParamInfo.flags is declared as UInt32,
and kAudioUnitParameterFlag_IsReadable = (1L << 30)

This does not return right results:

- (Boolean) isReadable
{
return (auParamInfo.flags & kAudioUnitParameterFlag_IsReadable);
}

but this does:

- (Boolean) isReadable
{
return (((UInt32) auParamInfo.flags & kAudioUnitParameterFlag_IsReadable) == ((UInt32) kAudioUnitParameterFlag_IsReadable));
}

Could someone explain why this is?

Looks like the Boolean of yours is a short int. If really so, the behaviour's as expected (but compiler should warn?!?).
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.
References: 
 >UInt32 and == (From: Jaeho Chang <email@hidden>)

  • Prev by Date: Re: UInt32 and ==
  • Next by Date: Re: why Obj-C
  • Previous by thread: Re: UInt32 and ==
  • Next by thread: Re: UInt32 and ==
  • Index(es):
    • Date
    • Thread