I'm not saying there's no good reasons to spin a block of code out into a separate function. I'm just saying that doing it just to avoid goto is not a good reason because, if that's all you're doing,...
Type: Posts; User: TheBigH
I'm not saying there's no good reasons to spin a block of code out into a separate function. I'm just saying that doing it just to avoid goto is not a good reason because, if that's all you're doing,...
void func()
{
while (whatever) {
while (something) {
if (such_and_such)
return; // <-- no goto needed
actual_work();
}
}
}