3 ms·
> BBC Basic would check each line for syntax errors as you typed it in From memory, I think that's because BBC basic tokenised each line as they were entered.
by teh_klev 5y ago
> BBC Basic would check each line for syntax errors as you typed it in
From memory, I think that's because BBC basic tokenised each line as they were entered. This also made it deceptively efficient with memory. BBC Basic was really quite a neat thing back then (especially the built-in 6502 assembler).
- Someone 5y agoIt would surprise me if any interpreted basic would store keywords as strings in memory. Replacing them by single bytes is more efficient on memory and makes interpreting the program simpler and faster (if you see a P, you won’t know yet whether that’s part of PRINT, PEEK, POKE, or of an assignment to P or P$). Memory and cycles where so expensive that you couldn’t afford not to make such optimizations. The Commodore Basics certainly replaced keywords by tokens (https://www.masswerk.at/nowgobang/2020/commodore-basic-renumber https://www.masswerk.at/nowgobang/2020/commodore-basic-renum...)
- dhosek 5y agoI think this was a feature common to all the Microsoft BASICs of the era. I don't remember if the TRS-80 BASIC did it or not since most of the screen time I got on one of those was standing up at the display computer at the Radio Shack about a mile from my house, while I had a lot of time with Apple Computers. Apple's original Integer BASIC (written by Woz, natch) did not tokenize its input. I don't recall if it did any syntax checking at input because it was hard to get a hold of in the post AppleSoft BASIC era (I did eventually get a hold of a pirated copy on floppy disk that could be loaded into the himem region on a 64K Apple ][+ or //e but that was useful mainly for Woz's MiniASM that was in the part of ROM that was left over when he had Integer BASIC loaded).