Table of Content
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 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.
Sat 07 | Day
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.
High 51F. Winds SW at 10 to 20 mph. Light rain developing after midnight. Did you mean, that it was really hard to write in spite of the fact that it's so stupid? I think, it'd give a better idea of what kind of person you are. Fortran used both numeric target labels on the left (col 1-5) and left a reserved block on the right (73-80) for sequence or comment.
[PATTERN] Futurama 10 home 20 sweet 30 go to 10
Winds SW at 10 to 15 mph. Considerable cloudiness. Occasional rain showers later at night. Winds SSW at 10 to 15 mph. Low 32F. Winds W at 10 to 20 mph. Some light rain is likely.
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 .
Home 20 Sweet 30 GOTO 10
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.
Later implementations added an optional sequence number on the right end of the line, so that when/if they got out of order, they could be resequenced by an automated reader. @ypnos, you've got that backwards. Numbers as labels predated BASIC - in FORTRAN, for example, but in BASIC they took on the editing/insertion function. Additionally, the first computers didn't have much memory, and storing a line number only takes two bytes .
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.
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.
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.

Get exclusive offers by signing up to our mailing list. Enter your email address. Technically it would read HOME SWEET in an infinite loop.
No comments:
Post a Comment