3 ms·
In Speccy Basic a GOTO jumped to a line number, so if you added code in that changed your numbering the GOTO broke. That was managed by using numbers that left
by onion2k 7y ago
In Speccy Basic a GOTO jumped to a line number, so if you added code in that changed your numbering the GOTO broke. That was managed by using numbers that left space (10, 20, and so on), but it was still horrible in a big program. Another issue was that you couldn't go back (that's what gosub was for). They also made code hard to follow because the execution jumped around all over the place, but that was less of a problem.
These days languages that have GOTO usually jump to a label so it's not quite as bad. They're still likely to end up as spaghetti though.
And yes, I am old.
- pansa2 7y agoModern languages usually only support goto within a single function. This significantly reduces the potential for spaghetti, compared to 8-bit BASICs that allowed you to jump anywhere within a program.