Re: BOOL parameter passed as nil object
Re: BOOL parameter passed as nil object
- Subject: Re: BOOL parameter passed as nil object
- From: Alex Zavatone <email@hidden>
- Date: Tue, 19 Apr 2016 16:20:12 -0400
On Apr 19, 2016, at 3:23 PM, Greg Parker wrote:
>
>> On Apr 19, 2016, at 12:07 PM, Jens Alfke <email@hidden> wrote:
>>
>>> On Apr 19, 2016, at 10:22 AM, Alex Zavatone <email@hidden> wrote:
>>>
>>> I believe that a BOOL can only be YES or NO. A nil value on a BOOL would be NO if I am correct.
>>
>> At the language level, yes.
>
> Not even there. On some platforms BOOL is defined as signed char. It may have any of 254 values other than YES or NO.
IIRC from when I was playing with the runtime, Isn't our friend the BOOL backed by a char in Obj-C?
Considering its use at the language level, would values of nil and 0 result as NO and every other value of 1 or > == YES?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden