Re: NSCFArray -- What the heck?
Re: NSCFArray -- What the heck?
- Subject: Re: NSCFArray -- What the heck?
- From: Michael Becker <email@hidden>
- Date: Mon, 19 Jan 2004 18:00:24 +0100
Well, arrays start at zero and go up to their bound minus 1. So this
array here has three elements: 0, 1, and 2. Your program tried to
access element 3, which is beyond the bounds of the array.
This isn't specific to NSCFArrays, but is standard throughout all
arrays in all languages (at least mainstream languages).
Thanks, sorry. I actually knew that, but somehow I figured that Cocoa
would (in order to point out the problem) print out the index of the
last item instead of the actual array-count. It felt a little strange
to read that "(3) is beyond (3)" :-)
My fault!
Bye,
Michael
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.