3 ms·
I tried to answer it in the article that someone recently posted to HN as well - https://news.ycombinator.com/item?id=38743062 https://news.ycombinator.com/item
by ikari_pl 3y ago
I tried to answer it in the article that someone recently posted to HN as well - https://news.ycombinator.com/item?id=38743062 https://news.ycombinator.com/item?id=38743062
spoilers: There was no GOSUB in the version Dijkstra commented on. There was not even anything else to put in an "THEN" statement than a line number ("THEN 210" is the code). If you wanted to store user's name in your variable, "n" was the name to go with, because "name" was not supported. And so on... :)
Oh, and the line numbers were a necessity.
- DebtDeflation 3y agoInteresting, I wasn't aware how much the language had evolved from the mid 1970s through the early 1980s. However, this line in your article would seem to indicate that GOSUB was available in the original version: >The first version of the language was extremely limited, compared to any later popular version of BASIC. The only supported keywords apart from math functions were: LET, PRINT, END, FOR...NEXT, GOTO, GOSUB...RETURN, IF...THEN, DEF, READ, DATA, DIM, and REM.