4 ms·
Double-breaking is a good sign that you need to refactor your code and put any of the while statements inside its own function.
by mFixman 7y ago
Double-breaking is a good sign that you need to refactor your code and put any of the while statements inside its own function.
- pjc50 7y agoThat generally makes it harder to follow and harder to optimise?
- Joky 7y agoQuite the opposite IMO: it gives a name to the computation and simplifies the control flow by making the computation more functional.
- kyllo 7y agoIn a high level language, yes, you should probably refactor code that looks like that. In C, no--just write the nested loop that iterates the pointers over the array, and use break or goto.
- burfog 7y agoWell then you'll need double-returning, which isn't generally available. One could use longjmp I suppose.