Guys,
I really don't care what your feelings are on the merits of goto. Please turn off your dogma regurgitators and focus on the issue at hand, which is how to exit from multiple levels of nested loops. The fact that some of you think nested loops are an algorithm design problem shows that some of you need some real world experience - school doesn't represent the reality of coding. You're going to be using nested loops one day, trust me. And on one of those days, you're going to want to exit out of the inner loop and move on with the rest of your code.
"goto" was a good solution for that. "Exit [n]" would work but I'd prefer some sort of label system for that. Being able to stack "exit" statements might work well enough...
I really don't care what your feelings are on the merits of goto. Please turn off your dogma regurgitators and focus on the issue at hand, which is how to exit from multiple levels of nested loops. The fact that some of you think nested loops are an algorithm design problem shows that some of you need some real world experience - school doesn't represent the reality of coding. You're going to be using nested loops one day, trust me. And on one of those days, you're going to want to exit out of the inner loop and move on with the rest of your code.
"goto" was a good solution for that. "Exit [n]" would work but I'd prefer some sort of label system for that. Being able to stack "exit" statements might work well enough...