* Alf P. Steinbach:
Thanks to all who responded -- I have one follow-up question, though.
But first, in summary, it seems that
* Most C++ programmers use 'continue' sparingly if at all, while some
few use it analogously to an early return.
* Where it's used best practice seems to be to regard it as signaling that
the loop invariant has been re-established and some progress made.
* Whether its use in that sense appears natural or not depends strongly on
earlier familiarity with that use. To some (reading left-margin 'else's?)
it appears to break the visible program flow, requiring reading more. To
those who use it it appears to make that flow more explicit, requiring
reading less.
* It's darned difficult to find any example where its use is clearly
advantagous, not very open to debate.
* Examples constructed to show 'continue' to be natural and of advantage,
invite an urge to re-factor, e.g. breaking the loop body up into individual
routines, thus, 'continue' might indicate the need for re-factoring.
I've probably missed one or two pertinent points, but.
In light of the three last points, what is a good textbook example of 'continue'
(I'm unable to come up with one)?
Cheers & TIA.,
- Alf