Microsoft went on to port their BASIC to more platforms, many of which were capable of full-screen editing, yet they kept with the line-oriented interface–why? It was a lowest common denominator which worked across all hardware and was trivial to bring up on a new hardware platform or operating system–full screen editing would have required a lot more platform-specific code to be written, and would have been more affected by differences in capabilities between different platforms (screen sizes/etc).
Not exactly. Home computers leveraged televisions; often by generating radio signals (as opposed to direct video input).
The quality was awful. You couldn't rely on the screen to do much better than 320 X 240.
Also, in those days, most of us used 300-baud VT100 terminals, which were VGA (640 X 480). Not much room for chrome, and long text and fancy layout was painful.
The displays were ASCII-driven. Basically the precursor to Emacs/Vi.
Also, as was pointed out in another comment, Structured Programming was still in the future. If you were lucky, you had GOTO.
Line numbers didn't use up characters. They could be inferred. Memory was not cheap. It was also very limited. Every character (including comments), used up memory, and impacted performance. Variables had names like A1, A2, etc.
It was real fun, reading legacy code...
You kids don't know how good ya got it. Back in my day, we had to use a morse code keypad for data entry...
Get off my lawn...
GOTO needed somewhere to jump to and the easiest thing to delineate was a line number.
- https://www.wikiwand.com/en/QuickBASIC
And BASIC itself was developed in 1963, when full screen editors may not have been as feasible.
1. BASIC was invented in the 1960s and supported the "teletype" style printing terminals of that era. Line oriented operation also enabled efficient multiuser/timesharing operation. (BASIC's simplicity, compactness and low resource requirements translated well to early 8- and 16-bit systems.)
2. BASIC traditionally used line numbers as GOTO/GOSUB targets.
3. Bill Gates' original Microsoft BASIC and (Allison et al.'s) Tiny BASIC, which fit in as little as 8KB and 2KB respectively, were the basis or inspiration for many 8-bit BASIC implementations. Both used line numbers for compatibility with Dartmouth BASIC and for line editing on printing terminals and serial CRTs that didn't support cursor positioning. For example, Microsoft/Altair BASIC worked with printing terminals, and Apple (Integer) BASIC for the Apple I worked with a CRT console that (afaik) didn't support cursor positioning.
That being said:
1. On systems like the C64 you can move the cursor around on screen, getting a sort of "screen editor" functionality although technically it is still a line editor.
2. As you note, there is no technical reason why labels rather than line numbers couldn't be used, and several 8- and 16-bit BASIC versions supported them; line numbers were optional in implementations such as Digital Research CBASIC or Microsoft QuickBASIC.
And, these were pre-IBM PC systems. (apple, radio shack 8 bit systems, many others).
Most computer labs had punch card stations and paper terminals when BASIC was created.
You often used LIST to see your program and edited it by adding, removing, replacing line numbers.
Later on DEC terminals we had an editor named TECO that allowed you to do search and replace, inserts, and other line-oriented changes. I’d have my school programs memorized so I could type commands without a list.
Video terminals (and PCs) became common in the mid 80’s. Screen editors were still slow on video terminals (connected to shared runtime systems), but awesome on PCs.
Line numbers were kept because line-oriented programming was easier to implement than a full-screen text editor and because they looked familiar to BASIC users. But many Microsoft BASICs, including GW-BASIC on PCs and Commodore BASIC, supported a sort of fake full screen: you could cursor around the entire screen and anything you pressed Enter or Return was scanned as a line and entered into BASIC. Smarts were built in to handle wrapped lines. This let you change a line in situ, hit Enter, and see the changed line entered into your program. Previous commands could be executed immediately provided they hadn't scrolled off the screen.
As a side note, neither early DOS nor CP/M had a full screen editor either, afair iirc. Edlin (poor man’s ed) is my earliest memory, which was a line-oriented editor. https://en.wikipedia.org/wiki/Edlin
https://softwareengineering.stackexchange.com/questions/3097...
https://www.youtube.com/watch?v=mOqguR3bBsk&t=1m8s
(Some things I didn't notice them getting into were `RESEQUENCE`, retyping a line with its number to edit a line, storing the program to flaky audiocassette, and losing the only copy of the game you were developing because you left your tape in, and your little brother absent-mindedly pressed the Record button while waiting his turn to play Parsec.)
Atari BASIC could export a BASIC program as a text file using the LIST command. Once exported, an editor could be used to edit the code:
LIST "D1:CODE.TXT"
Or you could only output part of the program, say from line 1000 to 2000: LIST "D1:PARTIAL.TXT",1000,2000
Then you could use the ENTER command to bring that code back in. If a program was already there, the lines would simply be inserted. If the ENTERed code had a line number the same as the program in memory, it would replace the one already in memory. This was a great way to have a subroutine library, kind of like #include in C: ENTER "D1:PARTIAL.TXT"
Outside of the examples above, it was difficult to have a full screen editor for BASIC because every line had to have a line number and you had to keep them organized. Also, the earliest microcomputers didn't have enough RAM for a full screen editor. The BBC Micro had a text editor in ROM but it couldn't be used for BASIC code. It could be used for other languages that were typically compiled.Most other languages either had a full screen editor or you could use any text editor. For example, Atari Logo has a full screen editor where you can edit one PROCEDURE at a time with:
EDIT "MYPROCEDURE
At this time, the best "full screen" editor we could find was actually a very expensive CRT terminal that did all of the editing in the terminal's memory. It required an operating system and a disk. The program read 1K of data into terminal memory, and using keys built into the terminal, you could move the cursor around and cut and paste. When done, it write the memory into a file, and read the next 1K of data.
The computer it was attached to had an editor like TECO (DEC), NSPEED (Data General), or EX (AT&T Unix). These were editors designed to be used on dumb terminals or even hard copy terminals (Like a TeleType ASR33, Silent 700, or DECWriter).
A full screen editor would need an operating system with support for files (Floppy or the outrageously expensive hard disk), and enough memory to support a program on top of the operating system, on top of the program you are editing.
Anyhow, Apple Pascal was available with a full-screen editor in 1979 (this required 64-K of RAM, a disk drive, and lots of disk switching). 1984-era MacBASIC had a GUI text editor (The mac shipped with 128K of RAM, 64K of ROM, and a 400K 3.5" floppy drive.
Most had classic line numbers but one had a forward on full screen editor. You could fullscreen edit what was on the screen. This include adding new lines anywhere visible. Any action that made text scroll off the top was inaccessible and would be written to disk.
To get back to earlier lines you had save all and restart.
All the answers from the '80s make me laugh.
(Well, at least the laughing is true. )
I remember writing programs first on paper, then transcribing them in. Line numbers were useful for that - making sure I didn't miss anything.
They were also incredibly useful when typing in programs from magazines!