• 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
UInt32 and ==
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UInt32 and ==


  • Subject: UInt32 and ==
  • From: Jaeho Chang <email@hidden>
  • Date: Tue, 9 Apr 2002 22:46:20 +0900

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?
Thanks in advance.

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

  • Follow-Ups:
    • Re: UInt32 and ==
      • From: rsharp <email@hidden>
    • Re: UInt32 and ==
      • From: Andy Lee <email@hidden>
    • Re: UInt32 and ==
      • From: Ondra Cada <email@hidden>
    • Re: UInt32 and ==
      • From: Lance Bland <email@hidden>
  • Prev by Date: Re: why Obj-C
  • Next by Date: Re: UInt32 and ==
  • Previous by thread: Robert and John: copyPath and Unix permissions.
  • Next by thread: Re: UInt32 and ==
  • Index(es):
    • Date
    • Thread