16
Technical support / Re: goto command
« on: December 20, 2022, 11:35:45 PM »
The destination xxx for GOTO @xxx is determined at compile time and not at run time. Hence it is not possible to assign it a variable.
Gary is right that structured programming can do away with GOTO altogether, although GOTO sometime can be a quick way to get out from deep inside a nested structure to another location. However, over-using GOTO can easily lead to so called "spaghetti codes" that can be error prone and difficult to debug so should be used sparingly.
Gary is right that structured programming can do away with GOTO altogether, although GOTO sometime can be a quick way to get out from deep inside a nested structure to another location. However, over-using GOTO can easily lead to so called "spaghetti codes" that can be error prone and difficult to debug so should be used sparingly.