On Fri 25 Jan 2019 at 17:36:37 +0000, Bailey, Scott wrote: > This abused several interesting features of the TRS-80?s Radio Shack > Level II BASIC? One (that I?ve never encountered anywhere else) was > that you didn?t have to put spaces in the code, and eliminating each > space saved a byte of memory. The following was perfectly legal and > readable if your eye was practiced: > > 100 FORI=1TO10 > 110 PRINTI > 120 NEXTI
I grew up with Commodore Basic (which was a version of Microsoft Basic, and to keep it vaguely relevant to this list, it was apparently written on a PDP-10 using its assembler and weird macros). That version also had that phenomenon. In fact, the first version even completely ignored spaces when it was tokenizing the keywords. This had sometimes mysterious effects: if you wrote IF ST AND 16 THEN ..., it would get misparsed as IF S TAN D 16 THEN... and report a ?SYNTAX ERROR. This problem was fixed in a later version. (workaround: write 16 AND ST) Apparently many people wrote GO TO instead of GOTO, and a new keyword GO was introduced specifically to keep that working. Which led to another bug: when LISTing a program with the new GO keyword (which was assigned the next-higher token value), using the older BASIC, the LIST routine would show to have an off-by-1 error and stop LISTing with an error message. -Olaf. -- ___ Olaf 'Rhialto' Seibert -- "What good is a Ring of Power \X/ rhialto/at/falu.nl -- if you're unable...to Speak." - Agent Elrond
signature.asc
Description: PGP signature
_______________________________________________ Simh mailing list Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh