Re: New switch/case idea

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

That should still work in Euphoria too, but it doesn't at the moment. I think this is a bug. To get it to work currently you have to add a label to the break clause...

  switch X label "A" do 
      case 1 then 
      . . . 
         if cond then 
             break "A" 
         end if 

Oops, no its not a bug. The break statement can also be used inside if statements to break out of a deeply nested if. So a break without a label and inside an if just skips to the end if line.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu