Table of Content
When BASIC was initially written, it was decided to move the sequence numbers to the left, into FORTRAN's label field, and to allow overwriting prior cards' memory footprint... This was intended for the interactive dev environment, but worked just as well with cards. And cards were used in some early implementations for a variety of reasons. In the early days, most programs were entered with punch cards. The punch cards were usually entered in sequence, usually one instruction per card, with labels (JMP/JSR targets) being a separate instruction card. It definately was a tie over from the mentality of punch cards.

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.
Sat 31 | Day
Also since most early home computers had a line numbered basic built in it became very common. Interestingly enough, this also allowed you to enter your programs non-sequentially, which helped with their limited editting capabilites. One of the first things I wrote in BASIC was a text edit program.
Showers early becoming a steady light rain late. Low 44F. Winds SW at 5 to 10 mph. Low 43F. Winds SSW at 10 to 15 mph. Its name is a reference to the traditional looping 'Hello world' program written by beginner programmers. As with all programming languages, we see the prefernces of the programmer in the various code examples that have been offered. This is probably Pascal, because in C there is no repeat..while loop.
Wed 04 | Day
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 .

Labels are not the reason for basic line numbers, they are only a side effect such to say. In addition, FORTRAN line numbers were arbitrary, more like numeric labels than line numbers. And in high school, we had a "modem" that let us dial into Dartmouth's computer, and experience this wonder first hand. I remember the fairly big problem of wanting to add a line between line 24 and 25, when there was no way of renumbering lines . Connect and share knowledge within a single location that is structured and easy to search.
Fri 06 | Day
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.
Low 42F. Winds S at 5 to 10 mph. It received more prominent vlog, blog, and print news coverage when Kevin Olson displayed the first ever American showing of ANSI art in a physical art gallery. Heck we could go nuts and read hex code that corrisponds to the ASCII codes of each of the characters, and read that out of a seperate data file.... VIEWIC is cool because "VIEWIC Identifies Ellipsis When It Can" contains ellipsis. Also, it's antecedent-contained ellipsis, so it forms another infinite loop. Back in the day you didn't have a 2 dimensional editor like emacs or vi.
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.
Get exclusive offers by signing up to our mailing list. Enter your email address. Technically it would read HOME SWEET in an infinite loop.
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.

In many ways, the BASIC line numbers were similar to those sequence numbers. Mostly cloudy skies early will become partly cloudy later in the day. High 43F. Winds SW at 5 to 10 mph.
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.
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.
No comments:
Post a Comment