• 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: How to print BOOLs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to print BOOLs


  • Subject: Re: How to print BOOLs
  • From: Scott Ribe <email@hidden>
  • Date: Fri, 08 Aug 2014 06:15:17 -0600

On Aug 7, 2014, at 10:34 PM, Quincey Morris <email@hidden> wrote:

> AFAIK it’s still an integer-based type in ARM 32-bit, and in all Intel architectures.

It is. But bool is a C99/C++ thing that can only take two values 0 or 1, and when you assign any non-zero value to it, it silently becomes 1. So you can't make the following mistake:

BOOL foo = 2
if( foo == YES )
...

--
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: 
 >How to print BOOLs (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to print BOOLs (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: How to print BOOLs
  • Next by Date: Re: OS X 10.9.4, Xcode 5.1.1 and mysql-5.6.20-osx10.8-x86_64
  • Previous by thread: Re: How to print BOOLs
  • Next by thread: Re: How to print BOOLs
  • Index(es):
    • Date
    • Thread