Re: New switch/case idea
- Posted by bernie Mar 31, 2009
- 1865 views
When was colon removed ? Does that mean I have to back into my code and remove the colons ?
My suggestion was simple and much easier to code and all it takes is 1 extra colon and no other keywords.
I think that things are being made too complicated with all the extra words.
switch X do case 1:: -- do code until next case is encountered then break ? 1 case 2, 3, 4: -- fall through ? 2 case 5: -- fall through ? 5 case 30:: -- do code until next case is encountered then break ? 30 ? 123 case 27:: -- do code until next case is encountered then break ? 27 case 81: -- fall through ? 81 end switch