• 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: #define and if statements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #define and if statements


  • Subject: Re: #define and if statements
  • From: Graham Cox <email@hidden>
  • Date: Sat, 27 Feb 2010 17:27:29 +1100

On 27/02/2010, at 5:22 PM, Adam Gerson wrote:

> #define IsDemo NO;


> What am I doing wrong?


Leave out the semi-colon. #define is a macro, the complete text is simply substituted for the name before compilation even starts, so you have the equivalent of if(NO;){...} which is invalid syntax.

--Graham


_______________________________________________

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

References: 
 >#define and if statements (From: Adam Gerson <email@hidden>)

  • Prev by Date: Re: #define and if statements
  • Next by Date: Re: #define and if statements
  • Previous by thread: Re: #define and if statements
  • Next by thread: Trouble with core data and Save As
  • Index(es):
    • Date
    • Thread