Improvement to switch-case statement

Mike James foo at bar.com
Wed Dec 31 14:16:55 PST 2008


Just an idea that could improve Ds switch-case statement - add an elipsys as in object Pascal to allow case ranges.

switch (var) {
    case 1:
        \\ do something
        break;
    case 2..10:
        \\ do something else
        break;
}

What do people think?

-=mike=-



More information about the Digitalmars-d mailing list