• 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: BOOL parameter passed as nil object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: BOOL parameter passed as nil object
      • From: Scott Ribe <email@hidden>
    • Re: BOOL parameter passed as nil object
      • From: John McCall <email@hidden>
References: 
 >BOOL parameter passed as nil object (From: Carl Hoefs <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Alex Zavatone <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Jens Alfke <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: Proper way to set up constants when building an iOS framework
  • Next by Date: Re: BOOL parameter passed as nil object
  • Previous by thread: Re: BOOL parameter passed as nil object
  • Next by thread: Re: BOOL parameter passed as nil object
  • Index(es):
    • Date
    • Thread