• 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: String constants and how to do them
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String constants and how to do them


  • Subject: Re: String constants and how to do them
  • From: Alastair Houghton <email@hidden>
  • Date: Thu, 25 Mar 2004 14:18:23 +0000

On 25 Mar 2004, at 13:45, Kevin Ballard wrote:

> I forget where I read this (perhaps it was Aaron Hillegass's book, but
> I forget), but I read somewhere that in general it's a better idea to
> use global strings set to a constant string rather than using #define,
> as in
>
> NSString *myPref = @"My Preference";
>
> instead of
>
> #define myPref @"My Preference"
>
> Is there a reason for this? Is this even true? What do you guys use?

Yes, yes and that (roughly).

See this thread:

http://cocoa.mamasam.com/COCOADEV/2003/10/2/75775.php

Kind regards,

Alastair.

--
http://www.alastairs-place.net

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


  • Follow-Ups:
    • Re: String constants and how to do them
      • From: j o a r <email@hidden>
References: 
 >String constants and how to do them (From: Kevin Ballard <email@hidden>)

  • Prev by Date: Re: String constants and how to do them
  • Next by Date: Re: String constants and how to do them
  • Previous by thread: Re: String constants and how to do them
  • Next by thread: Re: String constants and how to do them
  • Index(es):
    • Date
    • Thread