Shelley Powers: I started with BASIC. Contrary to popular myth, that’s B-A-S-I-C, which stands for: Beginner’s All-purpose Symbolic Instruction Code. However, the language is now usually given as just ‘Basic’
My first language was BASIC too. Ah, it is fun to reminisce.
Shelley Powers: I started with BASIC. Contrary to popular myth, that’s B-A-S-I-C, which stands for: Beginner’s All-purpose Symbolic Instruction Code. However, the language is now usually given as just ‘Basic’
My first language was BASIC too. Ah, it is fun to reminisce.
Shelley must have used a later version than I did. In earlier versions, assignment statements required the word “LET”, DIM was exclusively for arrays, IF statements were followed by either one to three line numbers, no “THEN GOTO”, it was either “THEN” or “GOTO”, but it meant the same. Oh, and expressions in PRINT statements were separated by semicolons.
Most of these restrictions were lifted in languages like Visual Basic (note: Basic, not BASIC) that, among other things, allowed identifiers that consisted of more than a single letter optionally followed by a single digit optionally followed by a dollar sign.
Oh, and everything was always in ALL CAPS. It was like all programs were YELLING AT YOU.
The best example I remember of spaghetti code is, quite aptly, a program that created mazes.
The syntax you are speaking was in use on Spectrum family microcomputers BASIC implementation,
Nice convenience was you didn’t have to type like those days ;-) every key on keyboard produced (almost) proper to the syntax context keyword when pressed. In those times ‘spaghetti code’ term didn’t exist probably ;-)
RANDOMIZE USR 0
Ah yes BASIC. the basic on the BBC microcomputer, while it allowed for IF THEN GOTO, railed against it. All of the training materials provided made it very clear that using GOTO led to spaghetti code - instead define a subroutine and use GOSUB...
and understand that not only was this a PC manual - but also a training manual for programming in British schools, with associated national TV programming. I am inclined to think Djikstra was being rhetorical.
The behavior of LET and DIM et al really varied on the dialect.
One of the more challenging tasks I encountered, for example, was translating programs written for Altair BASIC to be used on my Sinclair ZX-81. Having never programmed in Altair, that was a bit of a challenge :-)