Re: New switch/case idea
- Posted by DerekParnell (admin) Apr 06, 2009
- 1674 views
mattlewis said...
jeremy said...
mattlewis said...
Yes, I suppose it doesn't make much sense. We could ignore the first if block for a naked break, but that might lead to more confusion than it's worth, due to the changing nature of break.
I wonder, not changing it, because it would indeed be confusing, but giving a warning if a break is given inside of an if statement w/no label? It almost always means an error. In fact, it would always mean an error? Maybe it should be an error actually? When would it ever be a good thing?
It could be 'useful' if you jumped around using goto.
Matt
LOL
Go wash your mouth out with soap right now young man.
if cond then goto "A" label "C" proc1() break label "B" proc2() goto "C" label "A" proc3() goto "B" end if
... preparing the gallows as we speak ...