Re: KVC and KVO for arrays
Re: KVC and KVO for arrays
- Subject: Re: KVC and KVO for arrays
- From: Nick Toumpelis <email@hidden>
- Date: Fri, 15 Feb 2008 11:54:32 +0200
I don't know what you mean by "effect" on your code.
#define (in this case) is a preprocessing directive for a symbolic
constant; this is processed before the remaining source code and
cannot change.
Assuming that you want to define a constant, you can use the const
qualifier e.g. const double e = 2.71828182845905;
The other version (extern NSString *attendeesKey;) is an external
variable declaration (not a constant). I don't think that it is a very
good idea to use external variables (especially in object-oriented
programming).
Nick
On 14 Φεβ 2008, at 4:05 ΜΜ, John Dann wrote:
I'm not massively experienced in C, started in FORTRAN and came into
Objective-C this year, can anyone tell me how the two versions differ
and if adopting one over the other will have any effect on my code
later? Much of the Apple code I've seen use #define statements, but
I've seen the NSString elsewhere like in Hillegass's book.
Jon
_______________________________________________
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