Re: New switch/case idea

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

Presently, you have switch with fallthru for when you need to fallthrough at least once. And switch without fallthru if you never need fallthrough. What a pain if the user chooses the without fallthrough path and then finds that he needs fallthrough later.

I think what you are asking for has already been implemented.

switch 1 do -- Defaults to "without fallthru" 
   case 1 then 
       ? 1 
       fallthru 
   case 2 then 
       ? 2 
   case 3 then 
       ? 3 
end switch 

Output:
1
2

Is that what you are talking about?

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

Search



Quick Links

User menu

Not signed in.

Misc Menu