3 ms·
Depends on the dialect. It was mandatory on the Sinclair BASICs, for example (ZX81/ZX Spectrum), but optional on the Amstrad (Locomotive/Mallard) and BBC BASICs
by Doctor_Fegg 9y ago
Depends on the dialect. It was mandatory on the Sinclair BASICs, for example (ZX81/ZX Spectrum), but optional on the Amstrad (Locomotive/Mallard) and BBC BASICs. A quick search suggests it was optional as early as "MicroSoft"'s Altair BASIC: http://swtpc.com/mholley/Altair/BasicLanguage.pdf http://swtpc.com/mholley/Altair/BasicLanguage.pdf
As someone who learned first on a ZX81, I'd always assumed that "LET X=5" was the canonical form, and that "X=5" for assignment was just a shortening for convenience.
- jameshart 9y agoLikewise - but of course in Sinclair BASIC it was mandatory because every command had to begin with a keyword - a fact enforced by the fact that the cursor started out as a flashing [K], and every key on the keyboard was mapped to directly enter a keyword in that mode. LET was on the 'L' key. You literally couldn't type "a = 1" into a Spectrum/ZX81 - you couldn't type an 'a' unless you were at an [L] cursor prompt, which would only appear after you had chosen a keyword. Typing an 'a' at a [K] cursor would get you the keyword NEW. I wonder if you, like me, were also completely thrown when you first encountered a programming language where you didn't also have to enter line numbers...
- feintruled 9y ago> I wonder if you, like me, were also completely thrown when you first encountered a programming language where you didn't also have to enter line numbers... Haha, yes, totally! For me this was AMOS on the Amiga (a Basic variant). I was so thrown I started by using them anyway as they were supported by the interpreter - it just treated them as labels. I soon stopped though when I discovered it didn't reorder based on number, so you ended up with 10 print "world" 5 print "hello" 20 goto 5
- Doctor_Fegg 9y agoNot too thrown - I went from BASIC to Z80 assembler, and that just had labels...!