|
|
|
|
|
by spc476
4313 days ago
|
|
It depended upon the BASIC version, but the one you got on an IBM PC (the one embedded in the BIOS, usually only on PCs from IBM) was an odd cross between an editor and a REPL. Start out: PRINT "HELLO WORLD"
Press ENTER, and you get "HELLO WORLD" on the next line. Okay. Move the cursor up to the PRINT, hit the Insert key, type "10" then ENTER. You have now just entered a line into your program. Type LIST and you see 10 PRINT "HELLO WORLD"
Move the cursor back up to line 10. Change the "10" to "20" and change "HELLO WORLD" to "IT IS GREAT TO BE HERE" and press ENTER. Reposition the cursor over the LIST command and press ENTER: 10 PRINT "HELLO WORLD"
20 PRINT "IT IS GREAT TO BE HERE"
Moving the cursor to the top of the screen wouldn't cause the display to scroll up, but that was more due to constrained resources than anything else. But other than that, the entire screen was the editor. Type in an expression to test it out. Go back up and fix it. Once it's fine, slap a number in front to add it to the program. As a REPL, it was vastly different than anything REPL I've seen since. |
|
But as I said before, there were other languages available for said machines and those had their editors as well. What you're describing isn't a unique attribute to BASIC.