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

#define and if statements


  • Subject: #define and if statements
  • From: Adam Gerson <email@hidden>
  • Date: Sat, 27 Feb 2010 01:22:52 -0500

I have the following constant set up. I have tried all three of these
variations and none of them work in an if statement in cocoa. I get
error: expected `)' before ';' token

#define IsDemo NO;
#define IsDemo false;
#define IsDemo 0;


if (IsDemo) {
  bla...
}

Same problem, when I try:
#define FreeUpdateDaysAllowed 180;
if (daysSoFar > FreeUpdateDaysAllowed)


What am I doing wrong? Whats the right way to have a bool or int constant?

Thanks,
Adam
_______________________________________________

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: #define and if statements
      • From: Graham Cox <email@hidden>
    • Re: #define and if statements
      • From: Roland King <email@hidden>
    • Re: #define and if statements
      • From: Roland King <email@hidden>
    • Re: #define and if statements
      • From: Dave DeLong <email@hidden>
  • Prev by Date: UITableView Won't Update; Crashes with EXC_BAD_ACCESS
  • Next by Date: Re: #define and if statements
  • Previous by thread: Re: UITableView Won't Update; Crashes with EXC_BAD_ACCESS
  • Next by thread: Re: #define and if statements
  • Index(es):
    • Date
    • Thread