12.04.2013, 21:05
Try digging deeper into why people decided to look for alternatives to goto. The basic encounters were much more complicated than the first one here. And more about strucuted programming.
Also, I did a small speed test which revealed that using a while loop instead of goto in a situation such as yours is about 1.3-1.4 times faster. But please do have a look yourself.
But then again, I'm not saying goto is hideous or awful. It probably is not, and I have used it myself in the past for working with large loops, but retired from doing so after seeing a famous comic.
Also, I did a small speed test which revealed that using a while loop instead of goto in a situation such as yours is about 1.3-1.4 times faster. But please do have a look yourself.
But then again, I'm not saying goto is hideous or awful. It probably is not, and I have used it myself in the past for working with large loops, but retired from doing so after seeing a famous comic.