Monday, December 7, 2020

Futurama: 10 sin, 20 go to hell

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.

10 home 20 sweet 30 goto 10

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).

Home 20 Sweet 30 GOTO 10

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.

10 home 20 sweet 30 goto 10

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.

Sun 25 | Day

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.

10 home 20 sweet 30 goto 10

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.

Photo Gallery

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.

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.

Tue 03

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.

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.

Not the answer you're looking for? Browse other questions tagged basicline-numbers or ask your own question.

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.

10 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.

No comments:

Post a Comment

Ship Nationwide Online Pie Delivery House of Pies Company Store

Table Of Content Classic American Cuisine The Apple Pan Dutch Apple Pie Fresh Baked Pies Shipped to Your Doorstep FUSION SPECIALS "They...