As Walid stated, GOTO is a major cause of 'spaghetti code" and should be used with extreme caution.
In almost every case, there is a better method available.
HOWEVER, as with all programming techniques, GOTO has uses. Has anybody wondered why every language I am familiar with still supports GOTO?
ANSWER:
Because, there are specific cases where you might need to branch code without returning.
I am playing the devils advocate here. I just want to point out that I know of no programming technique that does not have a use somewhere at some time.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.