Re: Please explain this error message...
Re: Please explain this error message...
- Subject: Re: Please explain this error message...
- From: Ondra Cada <email@hidden>
- Date: Thu, 21 Feb 2002 15:40:02 +0100
Sherm,
>
>>>>> Sherm Pendley (SP) wrote at Thu, 21 Feb 2002 09:32:24 -0500:
SP> >>-[NSCFArray objectAtIndex:]: index (1) beyond bounds (1)
SP>
SP> Does this error message strike anyone else as counter-intuitive?
Not me. But well, I use C for ages ;)
SP> Wouldn't "index (1) beyond bounds(0)" make more sense?
It would not, in C/ObjC world -- there the upper array bound is generally
interpreted as *not inclusive*. In other words, the standard pattern is
for (i=0;i<BOUND;i++) ...
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.