Re: How to print BOOLs
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