• 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: Block variable syntax related question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Block variable syntax related question


  • Subject: Re: Block variable syntax related question
  • From: Scott Ribe <email@hidden>
  • Date: Fri, 09 Sep 2011 17:24:48 -0600

On Sep 9, 2011, at 5:10 PM, Jonas Maebe wrote:

> At least in C++, bool is only 32 bits when compiling for PPC 32 bits. It's 8 bits when compiling for all other Mac OS X architectures (PPC 64 bits, Intel 32/64, ARM). But maybe it's different for C?

No, I'm just behind the times it seems ;-) So BOOL & bool are now the same size for architectures that still matter, and certainly for the 64-bit runtime.

Still though, given the way BOOL works, I can guarantee you that there's code in production that stuffs flags into BOOLs, then sometimes tests for simple non-zero, and sometimes checks specific bits. Horrible code obviously, but BOOL can be abused this way, therefore it has been abused this way ;-)

--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Block variable syntax related question (From: David Hoerl <email@hidden>)
 >Re: Block variable syntax related question (From: Bavarious <email@hidden>)
 >Re: Block variable syntax related question (From: Jens Alfke <email@hidden>)
 >Re: Block variable syntax related question (From: Scott Ribe <email@hidden>)
 >Re: Block variable syntax related question (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: Block variable syntax related question
  • Next by Date: Re: Block variable syntax related question
  • Previous by thread: Re: Block variable syntax related question
  • Next by thread: Re: Block variable syntax related question
  • Index(es):
    • Date
    • Thread