Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
One of the reasons the goto statement gets such a bad rap is that older languages didn’t support conditional iteration. For example, without a do command, you’d have to do something like the following:
TopOfLoop:
x++;
if (X < 5)
 goto TopOfLoop;
That sample isn’t too bad; you can understand what it’s supposed to be doing fairly easily, but the other problem with the goto in older languages is that you could goto anywhere you wanted to stick a label. All too often the result was code that took hours to decipher, assuming you could figure it out at all. If you ever find yourself having to wonder where a goto statement leads, you can be pretty sure you’re not looking at tight, well-written code; you’re looking at a plate of spaghetti. Fix it.