I have a feature request: "Named enum scope inference"
Iain Buclaw
ibuclaw at ubuntu.com
Sat Sep 29 02:07:02 PDT 2012
On 29 September 2012 04:12, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> On 9/29/12, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
>> you could simply use with to solve the problem:
>>
>> with(MyFruit)
>> {
>> switch(fruit)
>> {
>> case apple: break;
>> case orange: break;
>> case banana: break;
>> }
>> }
>>
>
> It's even simpler:
> switch(fruit) with (MyFruit)
> {
> case apple: break;
> case orange: break;
> case banana: break;
> }
This. :-)
--
Iain Buclaw
*(p < e ? p++ : p) = (c & 0x0f) + '0';
More information about the Digitalmars-d
mailing list