Skip to main content
deleted 216 characters in body
Source Link
hyde
  • 3.8k
  • 4
  • 30
  • 36

If you are thinking of BASIC dialects of the 8-bit home microcomputers of 80's, then those computers did not have text editors (unless you bought some word processor application). There was no way to have the entire BASIC program source code "open in an editor", like you would have when programming today. Programmer wouldn't even think about the program as a source code file, or text, really.

5 LET COUNT=0
10 FOR I=1 TO 42
20 PRINT "Index", I
25 LET COUNT=COUNT+1
30 NEXT I

Another important function of line numbers in this environment is, you can LIST, that is print on screen, a range of lines by specifyingThere's the line numbers. Without line numbers, how would you specify what part of program you want to see, when you are not in editor where you can just move cursor and scroll throughbenefit (or the text? And same applies to removing lines, with line numbers it's easycurse, just ERASE 25 or something like that.

And then there'sas it enables the usual benefitfamous BASIC spaghetti code) of being able to use line numbers as a language construct, at least as a target of GOTO AND GOSUB commands. This could be replaced by labels, but using line numbers is much simpler to implement in BASIC interpreter, which still was a definite bonus in a typical 8-bit home computer of the '80s.

AlsoMore importantly, from user experience perspective, this isline numbers really are a surprisingly easy yet complete interface for editing the code. Just type a line starting with a number to insert new code. Use LIST 100-200 to show lines, ERASE to remove them 100-200. To edit a line, list it on screen, edit text on screen, and re-enter line. To remove a line, edit it to be empty, that is simply give line number with nothing after it. One paragraph to describe this. Compare trying to describe use of old text editors like edlin of DOS, or ed or ex of Unix: you need one paragraph (only slight hyperbole) just to explain how the user can exit them, when started accidentally!

Other answers explain how line numbers came to be,. I'm trying to cover here, why the line numbers survived as long as they did, how they kept solving a real-world problem: They offered a way to do the actual programming without a real editor, in a very simple way. Once proper, easy-to-use full-screen text editors became the mainstream way to edit code, both with hardware limitations disappearing and when inertia of people adapting new things was overcome, then line number based BASIC dialects quite quickly disappeared from use, because the core usageusability problem they solved was no longer an issue.

If you are thinking of BASIC dialects of the 8-bit home microcomputers, then those computers did not have text editors (unless you bought some word processor application). There was no way to have the entire BASIC program source code "open in an editor", like you would have when programming today. Programmer wouldn't even think about the program as a source code file, or text, really.

5 COUNT=0
10 FOR I=1 TO 42
20 PRINT "Index", I
25 LET COUNT=COUNT+1
30 NEXT I

Another important function of line numbers in this environment is, you can LIST, that is print on screen, a range of lines by specifying the line numbers. Without line numbers, how would you specify what part of program you want to see, when you are not in editor where you can just move cursor and scroll through the text? And same applies to removing lines, with line numbers it's easy, just ERASE 25 or something like that.

And then there's the usual benefit of being able to use line numbers as a language construct, at least as a target of GOTO AND GOSUB commands. This could be replaced by labels, but using line numbers is much simpler to implement in BASIC interpreter, which still was a definite bonus in a typical 8-bit home computer of the '80s.

Also, from user experience perspective, this is surprisingly easy interface for editing the code. Just type a line starting with a number to insert new code. Use LIST to show lines, ERASE to remove them. To edit a line, list it on screen, edit text on screen, and re-enter line. One paragraph to describe this. Compare trying to describe use of old text editors like edlin of DOS, or ed or ex of Unix: you need one paragraph just to explain how the user can exit them, when started accidentally!

Other answers explain how line numbers came to be, I'm trying to cover here, why the line numbers survived as long as they did, how they kept solving a real-world problem: They offered a way to do the actual programming without a real editor, in a very simple way. Once proper, easy-to-use full-screen text editors became the mainstream way to edit code, both with hardware limitations disappearing and when inertia of people adapting new things was overcome, then line number based BASIC dialects quite quickly disappeared from use, because the core usage problem they solved was no longer an issue.

If you are thinking of BASIC dialects of the 8-bit home microcomputers of 80's, then those computers did not have text editors (unless you bought some word processor application). There was no way to have the entire BASIC program source code "open in an editor", like you would have when programming today. Programmer wouldn't even think about the program as a source code file, or text, really.

5 LET COUNT=0
10 FOR I=1 TO 42
20 PRINT "Index", I
25 LET COUNT=COUNT+1
30 NEXT I

There's the benefit (or the curse, as it enables the famous BASIC spaghetti code) of being able to use line numbers as a language construct, at least as a target of GOTO AND GOSUB commands. This could be replaced by labels, but using line numbers is much simpler to implement in BASIC interpreter, which still was a definite bonus in a typical 8-bit home computer of the '80s.

More importantly, from user experience perspective, line numbers really are a surprisingly easy yet complete interface for editing the code. Just type a line starting with a number to insert new code. Use LIST 100-200 to show lines 100-200. To edit a line, list it on screen, edit text on screen, and re-enter line. To remove a line, edit it to be empty, that is simply give line number with nothing after it. One paragraph to describe this. Compare trying to describe use of old text editors like edlin of DOS, or ed or ex of Unix: you need one paragraph (only slight hyperbole) just to explain how the user can exit them, when started accidentally!

Other answers explain how line numbers came to be. I'm trying to cover here, why the line numbers survived as long as they did, how they kept solving a real-world problem: They offered a way to do the actual programming without a real editor, in a very simple way. Once proper, easy-to-use full-screen text editors became the mainstream way to edit code, both with hardware limitations disappearing and when inertia of people adapting new things was overcome, then line number based BASIC dialects quite quickly disappeared from use, because the core usability problem they solved was no longer an issue.

added 58 characters in body
Source Link
hyde
  • 3.8k
  • 4
  • 30
  • 36

And then there's the usual benefit of being able to use line numbers as a language construct, at least as a target of GOTO AND GOSUB commands. This could be replaced by labels, but using line numbers is much simpler to implement in BASIC interpreter, which isstill was a definite bonus in ana typical 8-bit microcomputerhome computer of the '80s.

Also, from user experience perspective, this is surprisingly simpleeasy interface for editing the code. Just type a line starting with a number to insert new code. Use LIST to show lines, ERASE to remove them. To edit a line, list it on screen, edit text on screen, and re-enter line. One paragraph to describe this. Compare trying to describe use of old text editors like edlin of DOS, or ed or ex of Unix: you need one paragraph just to explain how the user can exit them, when started accidentally!

And then there's the usual benefit of being able to use line numbers as a language construct, at least as a target of GOTO AND GOSUB commands. This could be replaced by labels, but using line numbers is much simpler to implement in BASIC interpreter, which is a definite bonus in an 8-bit microcomputer.

Also, this is surprisingly simple interface for editing the code. Just type a line starting with a number to insert new code. Use LIST to show lines, ERASE to remove them. To edit a line, list it on screen, edit text on screen, and re-enter line. One paragraph to describe this. Compare trying to describe use of old text editors like edlin of DOS, or ed or ex of Unix: you need one paragraph just to explain how the user can exit them, when started accidentally!

And then there's the usual benefit of being able to use line numbers as a language construct, at least as a target of GOTO AND GOSUB commands. This could be replaced by labels, but using line numbers is much simpler to implement in BASIC interpreter, which still was a definite bonus in a typical 8-bit home computer of the '80s.

Also, from user experience perspective, this is surprisingly easy interface for editing the code. Just type a line starting with a number to insert new code. Use LIST to show lines, ERASE to remove them. To edit a line, list it on screen, edit text on screen, and re-enter line. One paragraph to describe this. Compare trying to describe use of old text editors like edlin of DOS, or ed or ex of Unix: you need one paragraph just to explain how the user can exit them, when started accidentally!

added 113 characters in body
Source Link
hyde
  • 3.8k
  • 4
  • 30
  • 36

Also, this is surprisingly simple interface for editing the code. Just type a line starting with a number to insert new code. useUse LIST to show lines, ERASE to remove them, and to. To edit thema line, list themit on screen, edit text on screen, and re-enter line. One paragraph to describe this. Compare trying to describe use of old text editors like edlin of DOS, or ed or ex of Unix,: you need one paragraph just to explain how the user can exit them, when started accidentally!

This isOther answers explain how line numbers came to be, I'm trying to cover here, why the reason line numbers survived as long as they did., how they kept solving a real-world problem: They offeroffered a way to do the actual programming without a real editor, in a very simple way. Once proper, easy-to-use full-screen text editors became the mainstream way to edit code, with both with hardware limitations disappearing and when inertia of people adapting new things was overcome, then line number based BASIC dialects quite quickly disappeared from use, because the core usage problem they solved was no longer an issue.

Also, this is surprisingly simple interface for editing the code. Just type a line starting with a number to insert new code. use LIST to show lines, ERASE to remove them, and to edit them, list them on screen, edit text on screen, and re-enter line. One paragraph to describe this. Compare trying to describe use of old text editors like edlin of DOS, or ed or ex of Unix, you need one paragraph just to explain how the user can exit them, when started accidentally!

This is the reason line numbers survived as long as they did. They offer a way to do the actual programming without a real editor, in a very simple way. Once proper, easy-to-use full-screen text editors became the mainstream way to edit code, with both hardware limitations disappearing and inertia of people adapting new things was overcome, then line number based BASIC dialects quite quickly disappeared from use, because the core usage problem they solved was no longer an issue.

Also, this is surprisingly simple interface for editing the code. Just type a line starting with a number to insert new code. Use LIST to show lines, ERASE to remove them. To edit a line, list it on screen, edit text on screen, and re-enter line. One paragraph to describe this. Compare trying to describe use of old text editors like edlin of DOS, or ed or ex of Unix: you need one paragraph just to explain how the user can exit them, when started accidentally!

Other answers explain how line numbers came to be, I'm trying to cover here, why the line numbers survived as long as they did, how they kept solving a real-world problem: They offered a way to do the actual programming without a real editor, in a very simple way. Once proper, easy-to-use full-screen text editors became the mainstream way to edit code, both with hardware limitations disappearing and when inertia of people adapting new things was overcome, then line number based BASIC dialects quite quickly disappeared from use, because the core usage problem they solved was no longer an issue.

added 652 characters in body
Source Link
hyde
  • 3.8k
  • 4
  • 30
  • 36
Loading
added 661 characters in body
Source Link
hyde
  • 3.8k
  • 4
  • 30
  • 36
Loading
Source Link
hyde
  • 3.8k
  • 4
  • 30
  • 36
Loading