in reply to Re: A BASIC interpreter to run StarTrek
in thread A BASIC interpreter to run StarTrek

> FORI=1TO8:D(I)=0:NEXTI

I remember the book that's from, one of the early bestsellers in computer literature:)

But was the lack of whitespace between constructs and variables really originally so?

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: A BASIC interpreter to run StarTrek
by GrandFather (Saint) on Aug 11, 2021 at 21:13 UTC

    BASIC was widely adopted in mini-computers and micro-computers with very limited memory so most implementations allowed white space to be expunged. The original Dartmouth BASIC doesn't mention the option of omitting spaces so that probably wasn't a thing.

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
      OK, good point.

      FWIW: When I started programming almost all available BASIC dialects (Apple, Commodore, Atari, ...) where based on MS BASIC which tokenized all keywords before storing or running. Whitespace was added automatically when listing. °

      EDIT

      see https://www.c64-wiki.com/wiki/BASIC_token for more

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

      update

      °) IOW these kind of tricks where not only unnecessary but also impossible, because the source was automatically "linted" with whitespace when listed.

        FWIW, I started with BASIC on an HP 2000. Next was a DEC Rainbow 100 (CPM 80/86) and the original IBM PC. Next was on a Wang mini followed by a Data General mini on DGUX. Mixed in there were various MS and IBM BASICs as well as PowerBASIC and Atari BASIC.

        While I was in school using the HP 2000 BASIC I bought a book that showed the differences between about 2 (or 3?) dozen different variations of BASIC.