• 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: Why does NSArray count return NSUInteger?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does NSArray count return NSUInteger?


  • Subject: Re: Why does NSArray count return NSUInteger?
  • From: julius <email@hidden>
  • Date: Mon, 30 May 2011 22:10:57 +0100

On 30 May 2011, at 21:56, Dave Zarzycki wrote:

> On May 30, 2011, at 1:45 PM, julius wrote:
>
>>
>> On 30 May 2011, at 20:03,Quincey Morris wrote
>>>
>>> On May 30, 2011, at 08:27, julius wrote:
>>>
>>>> All I had hoped was that someone on this list might illuminate the issue more than has happened so far.
>>>
>>> The problem isn't really lack of illumination, but that you're not prepared to accept the consequences of the explanation.
>>
>> Hilarity and riot.
>>
>>>
>>> Here's my version of the illumination:
>>>
>> snip
>>> -- It at least theoretically provides opportunities for compile-type (== better) error messages if you accidentally pass a value of the wrong type.
>>>
>>> -- It at least theoretically eliminates the need to code some range validation checks.
>>>
>>
>> Here is a nice instance that I think quite germane.
>>
>> The input parameter to NSArray's objectAtIndex: is an NSUInteger.
>> Both these code snippets work perfectly (they retrieve element 3).
>> 	zStr = [zAry objectAtIndex:3.1];
>> and
>> 	CGFloat zF1 = 3.2;
>> 	zStr = [zAry objectAtIndex:zF1];
>>
>> I'm sure that by setting the right flags one could get warning messages to appear.
>
>
> Julius,
>
> As others have pointed out, this has nothing to do with Objective-C or Cocoa.

NSArray and its count method has nothing to do with Cocoa?


I'm off to save a few sheep off the Antrim coast.

Julius


http://juliuspaintings.co.uk



_______________________________________________

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: Why does NSArray count return NSUInteger?
      • From: "email@hidden" <email@hidden>
References: 
 >Re: Why does NSArray count return NSUInteger? (From: julius <email@hidden>)
 >Re: Why does NSArray count return NSUInteger? (From: Dave Zarzycki <email@hidden>)

  • Prev by Date: Re: Why does NSArray count return NSUInteger?
  • Next by Date: Re: Why does NSArray count return NSUInteger?
  • Previous by thread: Re: Why does NSArray count return NSUInteger?
  • Next by thread: Re: Why does NSArray count return NSUInteger?
  • Index(es):
    • Date
    • Thread