Re: very simple NSRange q
Re: very simple NSRange q
- Subject: Re: very simple NSRange q
- From: Andrew Pinski <email@hidden>
- Date: Mon, 11 Aug 2003 23:03:45 -0400
On Monday, Aug 11, 2003, at 10:13 US/Eastern, Alastair J.Houghton wrote:
Use NSMakeRange(). The second one doesn't work because it isn't legal
to write an initialiser (which is what {start, length} is) in code,
only in a declaration. You *can* work around this with GCC by writing
(NSRange){start, length}, but it's a non-standard extension. Better
to use the helpfully provided NSMakeRange() function. BTW, there are
similar functions for many of the other struct types.
(NSRange){start, length} is not a non standard extension as it is part
of ISO C99.
Thanks,
Andrew Pinski
_______________________________________________
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.