Re: switch statement

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

I'd still like to see this construct without "do" and ":" :

  switch x 
     case "first" 
          action1() 
          break 
     case "second" 
          action2() 
          break 
     case "another" 
          action3() 
          break 
     . . . 
 end switch 

Looks much better (on my ultra conservative taste) smile

I can agree with this. We don't have "if/do" we have "if/then". And "switch" is not a loop construct like "for/do" or "while/do". I think "switch/case" is all we need.

-Greg

P.S. Igor, you do not need to insert line breaks manually in your messages. A single empty line will create a new paragraph.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu