Re: switch statement

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

Will be great if the switch can process sequences.

The switch statement can do sequences...

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

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

Regards,
Igor Kachan
kinz@peterlink.ru

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

Search



Quick Links

User menu

Not signed in.

Misc Menu