• 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: Why are BOOL and bool distinct types?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why are BOOL and bool distinct types?


  • Subject: Re: Why are BOOL and bool distinct types?
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Wed, 8 Jun 2005 11:12:33 +0200

At 1:44 Uhr -0700 08.06.2005, Todd Blanchard wrote:
Digging around the header of NSMethodInvocation I see a NSObjCBoolType 'B' tag has been added. Nifty, so why is @encode(BOOL) == c but @encode(bool) == 'B'?

It's about size. BOOL, bool (and, Boolean, too) all have different sizes. That's for historcial reasons (padding, alignment on the 680x0 series of CPUs etc.), and it's actually a *feature* that Apple thought of letting you save these non-ObjC data types (bool and Boolean).


If Apple really wanted to see more apps on the platform - they'd fix this basic Basic BASIC stuff so I could quit spending all my development time working around their bugs and actually get to features for my app.

As I said, it's not a bug. This is completely correct behavior.

Filed as Bug ID# <https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/8/wo/8pSV2Hbpz8KL5f7UsdqMvg/4.27>4141976 - but 'cmon man - this is programming 101 here.

Yes, indeed it is. -- Cheers, M. Uli Kusterer ------------------------------------------------------------ "The Witnesses of TeachText are everywhere..." http://www.zathras.de _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Why are BOOL and bool distinct types? (From: Todd Blanchard <email@hidden>)

  • Prev by Date: Why are BOOL and bool distinct types?
  • Next by Date: Re: naming variables on the fly
  • Previous by thread: Why are BOOL and bool distinct types?
  • Next by thread: Re: Why are BOOL and bool distinct types?
  • Index(es):
    • Date
    • Thread