• 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: KVC and KVO for arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: KVC and KVO for arrays
      • From: "John Dann" <email@hidden>
References: 
 >Re: KVC and KVO for arrays (From: "John Dann" <email@hidden>)

  • Prev by Date: Front and back flip animation
  • Next by Date: Re: Strategies to prevent class name clashes
  • Previous by thread: Re: KVC and KVO for arrays
  • Next by thread: Re: KVC and KVO for arrays
  • Index(es):
    • Date
    • Thread