• 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: Case label does not reduce to an integer constant . . .
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Case label does not reduce to an integer constant . . .


  • Subject: Re: Case label does not reduce to an integer constant . . .
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Mon, 8 Feb 2010 17:37:59 +0100


Le 8 févr. 2010 à 16:59, Michael A. Crawford a écrit :

The following excerpts from my code show a constant definition that does not reduce to an integer constant in my case statement, but only in the release build of my iPhone project.  In the debug build it works just fine.  Any ideas?


static NSUInteger const kGPSSettingsRowIndex            = 0;

    switch ( indexPath.row )
    {
    case kGPSSettingsRowIndex:
        cell.textLabel.text = @"GPS Settings";
        break;

Uses enum to define integer constant. 
I don't know the rule to define if an _expression_ is an "Integer Constant _expression_" or not, but with enum, it always works.

enum {
kGPSSettingsRowIndex = 0,
};


-- Jean-Daniel




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Case label does not reduce to an integer constant . . . (From: "Michael A. Crawford" <email@hidden>)

  • Prev by Date: Case label does not reduce to an integer constant . . .
  • Next by Date: Re: Case label does not reduce to an integer constant . . .
  • Previous by thread: Case label does not reduce to an integer constant . . .
  • Next by thread: Re: Case label does not reduce to an integer constant . . .
  • Index(es):
    • Date
    • Thread