• 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
Using #define a good way for String constants, like enums for NSIntegers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using #define a good way for String constants, like enums for NSIntegers?


  • Subject: Using #define a good way for String constants, like enums for NSIntegers?
  • From: Devraj Mukherjee <email@hidden>
  • Date: Tue, 09 Aug 2011 20:47:30 +1000

Hi all,

I am writing an API client for a REST service, parts of the REST API
returns fixed String values. E.g. status of an order.

I want to represents these fixed responses as constants. I have
represented fixed numeric values using enums and used a typedef to
represent the data type.

Are Strings defined using #define good enough as String constants?

Or Should I be doing this another way?

Thanks for your time.
_______________________________________________

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: Using #define a good way for String constants, like enums for NSIntegers?
      • From: Chris Hanson <email@hidden>
    • Re: Using #define a good way for String constants, like enums for NSIntegers?
      • From: Jerry Krinock <email@hidden>
    • Re: Using #define a good way for String constants, like enums for NSIntegers?
      • From: Vyacheslav Karamov <email@hidden>
  • Prev by Date: Re: Asynchronous downloading and parsing of XML
  • Next by Date: Frameworks (ConnectionKit)
  • Previous by thread: Re: blocks and retaining CoreFoundation objects
  • Next by thread: Re: Using #define a good way for String constants, like enums for NSIntegers?
  • Index(es):
    • Date
    • Thread