http://qs321.pair.com?node_id=11135793


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

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
  • Comment on Re^3: A BASIC interpreter to run StarTrek

Replies are listed 'Best First'.
Re^4: A BASIC interpreter to run StarTrek
by LanX (Saint) on Aug 12, 2021 at 00:04 UTC
    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.

        I used http://www.vintage-basic.net/downloads/Vintage_BASIC_Users_Guide.html as a reference while writing the interpreter so it should be pretty close to MS BASICs of the early '80s. The Guide leaves a few unanswered questions ("should logic short circuit?" for example), but proved sufficient to get my interpreter working enough to run StarTrek (for some yet to be determined definition of "run").

        Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

        The local university had a HP2000, and installed a terminal in the high school, and there I spent many a lunch hour and time after school through my high school years.

        They had printed out the entire program catalog and posted it on the wall, so my friends and I who wanted to know how this stuff worked our way through the list alphabetically. You could load a program into local memory and edit a copy. We would change things around and see what happened. In this way we taught ourselves BASIC and programming.

        We ignored that oft repeated advice to go thru the whole list first before beginning. Imagine our dismay when, after a few years, we finally reached the letter T and happened upon the series of programs titled TUTOR1, TUTOR2, etc. that taught you how to program. By that time, we could have written those tutorial programs!

        But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

        How about BASIC on an ISC 19" color terminal? $work used these terminals with an add-on IR touch bezel for control system operator interfaces.

        I wrote a real estate investment model on the ISC(way before VisiCalc existed). It was a very nice moon-light job as the customer kept adding features!

        James

        There's never enough time to do it right, but always enough time to do it over...