Re: if statements vs. switch
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.