3 ms·
break. One usecase: you have loops nested 3 deep, and you want to end it all when you find something. You label the outermost loop "exit", and then say "break e
by 13ren 18y ago
break. One usecase: you have loops nested 3 deep, and you want to end it all when you find something. You label the outermost loop "exit", and then say "break exit;"
I think continue can use labels, too. (EDITED)
- jamongkad 18y agoForgive me but this is going to be a bit off topic. I think it's considered poor taste when a hacker decides to utilize nested loops 3 levels deep.
- ricky_clarkson 18y agoI consider it poor taste when a hacker uses a loop (other than a tail call). Nesting is irrelevant.
- gdee 18y agooh... the height of silliness...
- Tichy 18y agoSometimes you might have no other choice? I think there are more important things to worry about than this.