• 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: if statements vs. switch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: if statements vs. switch


  • Subject: Re: if statements vs. switch
  • From: Chris Ridd <email@hidden>
  • Date: Wed, 04 Sep 2002 17:27:17 +0100

On 4/9/02 4:01 pm, Ondra Cada <email@hidden> wrote:
> 'Course it will. That's why it is limited to constants in 'case' labels
> (though I personally would prefer expressions allowed too, with a fallback
> to less efficient translation, but it is just not so).

I believe that in C++ case labels can be "const" variables, unlike C. I
expect there are caveats with that of course, like you can't cast a value
into a const variable and have the switch use the new value etc etc.

Cheers,

Chris
_______________________________________________
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: if statements vs. switch
      • From: Jeffrey J Barbose <email@hidden>
References: 
 >Re: if statements vs. switch (From: Ondra Cada <email@hidden>)

  • Prev by Date: Global notification when front process changes?
  • Next by Date: Re: if statements vs. switch
  • Previous by thread: Re: if statements vs. switch
  • Next by thread: Re: if statements vs. switch
  • Index(es):
    • Date
    • Thread