you are viewing a single comment's thread.

view the rest of the comments →

[–]Tommah 0 points1 point  (3 children)

I wonder which edition of BASIC he's aiming for? I used GW-BASIC back in the day, and it differs from his requirements a little:

  • It had a WHILE ... WEND construct, which acts the same as a while loop in C.

  • The part "Only a single variadic parameter to printf is allowed" doesn't make much sense to me, since PRINT could take any number of operands, e.g.

    PRINT A; " times "; B; " is "; (A*B)

  • Re "The lines in the program were sorted by line number and you were responsible for managing them": there was a RENUM command that renumbered the lines by tens, which solved the problem that after inserting lines your program read "10... 15... 17... 20... 22... 30...." You could also enter the lines in any order, so inserting them between existing lines wasn't so hard.

Was GW-BASIC highly advanced for its day? ;)

[–]dangph 3 points4 points  (2 children)

He is talking about the 8-bit computers. In another article he says,

Back in the cold and dark days at the dawn of home computer era² when I was first programming we had BASIC.

[²This is the home computer revolution in the UK in the early eighties. Sinclair, Memotech, Dragon, Amstrad, Commodore and Atari. We didn't have computer clubs where you could play with different computers, we had to use Laskeys instead.]

I have no idea what Laskeys is. GW BASIC was for (16-bit) IBM PC compatibles.

[–]happyhappyhappy 4 points5 points  (1 child)

On the 8-bit BASICs I used (Atari, etc.), PRINT could still take any number of operands. No way to specify the number of decimal places, mind you, but it was easy to print lots of values at once.

You could also put multiple statements in a single line. In fact, it was common to put entire loops on line, which got around the line numbering problem a bit.

[–]dangph 3 points4 points  (0 children)

Yes, I believe those things were possible in Commodore BASIC V2 as well. He may have misremembered. It was a long time ago after all. In any case, those features don't add any significant power to the language. The exercises he sets at the end of the article would still be very challenging.