Quote Originally Posted by TheBigH View Post
But then you have to pass the variables that "whatever", "something", and "such_and_such" depend on to the function. Even assuming this situation could be handled with a void func(void), oogabooga's solution with the goto is clearer to me, because of the intelligent choice of label name.

If I saw a function call like the one you suggest in someone else's code, I would think "You made me scroll all the way to the bottom to look at this function and then all the way back to where I was, just so you could avoid using a goto that would jump forward maybe three lines. Riiiiiiiight."
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 reasoned about in isolation from the rest of the program. I think that's a very good thing.

I'm so tired of dealing with functions spanning several screen pages and containing dozens of variables, loops, if-else cascades, etc.