The only use of the goto is to skip some code. An else would have been preferred.
Hmmm. An else is a typical solution, but it's not something that makes me jump with joy either. It means there's a large block of code that will be indented. And would you have more such cases, the code crawls to the right hand margin.
A continue might solve this:
And if you do last instead of next, the continue won't be executed.if (CONDITION) {{ # Note the *double* opening brace. ... some code ... next if SOME_CONDITION; ... more code ... next if OTHER_CONDITION; ... even more code ... } continue { ... end stuff ... } }
Abigail
In reply to Re: strict isn't everything
by Abigail-II
in thread strict isn't everything
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |