Re: New switch/case idea

new topic     » goto parent     » topic index » view thread      » older message » newer message
kinz said...

The more I read about switch, select, break, continue, do, then etc, the more I'd like to see just something like to old good simplest basic's "on X goto", namely EU version:

on X 
    case 1 
        ? 1  
    case 2, 3, 4, "John" 
        ? 2  
end on 

Regards,
Igor Kachan
kinz@peterlink.ru

I happen to agree with Igor on using on X instead of "switch", although I would "re-complicate" it by allowing the "with fallthrough" & break and continue and maybe the "then". I think anyone, whether used to the idea/name "switch" or not would understand it immediatly.

This would also maybe remove the concern that programmers from other languages who expect fallthrough to be the default might be confused if not fallthrough is the default, since the word "switch" would not be there to engender any confusion re past expectations.

Dan

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu