Table of Content
Showers early becoming a steady light rain later in the day. High 48F. Winds SW at 10 to 15 mph. In Mother's day, there are also some programming language jokes.. I think the question was about languages where you had to type in the line numbers yourself. I agree line numbers that are displayed automatically by the editor are very useful .

But as soon as I got my hand on a Vax with it's Extended BASIC, I was so happy to never see a line number again. Back in the fifties, when high programming languages were in their early beginnings, there were no terminals, no editors, no monitors , just card punchers and readers and printers . Later, tape was introduced, but that's another story. On the first interfaces BASIC was available for, there was no shiny editor, not even something like vi or emacs . You could only print out your program on the console and then you would add new lines or replace them, by giving the appropriate line number first. You could not navigate through the "file" with the cursor like you are used to nowadays.
Home 20 Sweet 30 GOTO 10
Therefore the line numbers weren't only needed as labels for the infamous GOTO, but indeed needed to tell the interpreter at what position in the program flow you are editing. Mostly cloudy in the evening then periods of showers after midnight. Low 38F. Winds SW at 5 to 10 mph. Overcast with rain showers at times. Low 39F. Winds SW at 5 to 10 mph. Overcast with showers at times.
This code would just make an infinite loop not doing anything, since is a code comment. Actually, I would argue that any answer which does not mention "punch cards" is incomplete, if it mentions neither punch cards nor FORTRAN, it is wrong. I can say that this is definitively right because my parents both used punch cards on a regular basis , then migrated to Basic and COBOL in the 80's.
Print/export
Fortran also qualifies. A few showers early with overcast skies late. Mostly cloudy skies. High 49F. Winds SSW at 5 to 10 mph. Steady light rain in the evening. Showers continuing late.

Writing a label takes more memory, first in the location, where that label is defined, then in any jump command. I'd guess it comes from assembler, where each instruction has an address which may be jumped to by another instruction. They originated in FORTRAN, from which BASIC was derived. However, in FORTRAN only lines referenced by other lines needed numbers. In BASIC they had a secondary use, which was to allow editing of specific lines. That's actually how I learned to program - editing by retyping.
Wed 28 | Day
Finally in the good old days there weren't any fancy editors. The only "editor" was a simple command line interface, which treated everything starting with a number being part of a program and everything else as commands to be executed immediately. Most prominent example should be the Commodore 64.

A few showers developing late. Low 42F. Winds SSW at 5 to 10 mph. High 51F. Winds SW at 10 to 15 mph. Partly cloudy skies. High 39F. Winds WSW at 5 to 10 mph. Light rain early...then remaining cloudy with showers overnight.
High 46F. Winds SW at 10 to 15 mph. A few showers early with mostly cloudy conditions later in the day. High 49F. Winds SW at 5 to 10 mph. Mostly cloudy during the evening.
This was a prototype, implemented as an experiment while the teletype-based interface that the language was being designed for was still being developed. That DTSS had a rudimentary IDE, which was nothing more than an interactive command line. The original editor for DOS was a wonderful utility called edlin. You could only edit a single line. Your program was stored in memory and you would type in single line commands to edit single lines. Before there was such a thing as a VDT , we old-timers programmed on punch cards.
All you had was the command line. +1 - this is the right answer. The combination of line editor and immediate execution in the same environment was probably BASIC's most important contribution. Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Not all versions of BASIC required line numbers. QBasic, for instance, supported labels. You could then jump to those with GOTO (ignoring Dijkstra's "Go To Statement Considered Harmful," for the moment).
This question needs to be more focused. It is not currently accepting answers. There's actually a problem because that results in home, sweet, home, sweet, home etc. Cloudy with occasional rain showers.
Another advantage in the BASIC world is that in the old days BASIC was interpreted as it was run. Mostly cloudy early with showers developing later in the day. Winds SW at 5 to 10 mph. Mostly cloudy skies with a few showers late. Low 42F. Winds SW at 5 to 10 mph.
Sun 25
Winds SSW at 5 to 10 mph. Cloudy with showers. 20 GOTO 10 was an art gallery in operation from 2008 to 2012, founded by Christopher Abad in San Francisco, California, United States. And as will all programming lanugages there are about as many ways to approach it as there are people offering opinions. But it's still not infinite and the other one was much more readable. I prefer to sacrifice number of lines for readability.

Is so that a programmer can come back in later and add, say, a line 25 without having to redo all the numbers. The answer is already above. Paul Tomblin wrote it . QBasic was one of the first versions of BASIC not to require line numbers. It came with a program to remove unneeded line numbers from GW-BASIC code.
No comments:
Post a Comment