3 ms·
In this case, the goto is into the loop, not out of it, so named break/continue would not help. And the only point of having named break/continue would be to n
by tspiteri 12y ago
In this case, the goto is into the loop, not out of it, so named break/continue would not help.
And the only point of having named break/continue would be to not use goto. I don't see the point in that, since to me, this:
for (i = 0; i < ie; i++) {
continue_i:
for (j = 0; j < je; j++) {
if (cond1)
goto break_i;
if (cond2)
goto continue_i;
/* ... */
}
}
break_i:
is as readable as this:
loop_i:
for (i = 0; i < ie; i++) {
for (j = 0; j < je; j++) {
if (cond1)
break loop_i;
if (cond2)
continue loop_i;
/* ... */
}
}