Actually I disagree with AM below (So why am I replying to you? TIMTOPTPI ;-) I think judicious use of labels helps code legibility a great deal, even when the loops aren't nested.
For example, when I'm processing a result set from a database, I often label the loop RECORD: or ROW:. That way, after some long block of code, I can write next ROW; to make it clear I'm short-circuiting the rest of the logic. It's the same reason I choose variable names carefully: it helps me (five years from now when I'm re-reading it) keep track of what's going on.
In reply to Re (3): Thoughts on naming loop LABEL: (TMTOWTDI, why label loops?)
by VSarkiss
in thread Thoughts on naming loop LABEL:
by ybiC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |