Re: New switch/case idea
- Posted by jeremy (admin) Apr 06, 2009
- 1698 views
mattlewis said...
Does that mean that break without label inside an if-then statement is useless ?
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. [/quote]
Matt,
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?
Jeremy