Moving all that stuff out to a separate function encourages an approach to programming that emphasizes breaking down problems into small, manageable pieces that can be developed, debugged and...
Type: Posts; User: antred
Moving all that stuff out to a separate function encourages an approach to programming that emphasizes breaking down problems into small, manageable pieces that can be developed, debugged and...
void func()
{
while (whatever) {
while (something) {
if (such_and_such)
return; // <-- no goto needed
actual_work();
}
}
}
I've heard some people say that there are some legitimate uses for goto, but personally I've never been presented a convincing case.