3 ms·
Many 1970/80s 8-bit basics allowed GOTO X rather than GOTO 10000. In Sinclair Basic though replacing the constant with the variable was potentially a significa
by klelatti 5y ago
Many 1970/80s 8-bit basics allowed GOTO X rather than GOTO 10000.
In Sinclair Basic though replacing the constant with the variable was potentially a significant efficiency win as the 10000 wasn't just stored as five bytes but rather 5 bytes plus six further bytes containing a floating point or integer representation of 10000.
Using GOTO X thus saved ten bytes in this case - less the assignment to X. If there were lots of GOTOs (or more likely GOSUBs) to a particular point in the code this was worth doing. On a machine with less than 10k of free memory (16k Spectrum) this was a worthwhile saving and so was used quite a bit in practice.