BASIC

From Maze

(Difference between revisions)
Jump to: navigation, search
(→Altair BASIC and Micro-Soft)
(→Line Numbers and Colons: BASIC's Responses to Changing Hardware(sidebar))
Line 142:Line 142:
Ultimately, BASIC became what it was in 1982 thanks to the institution of higher education where it was first developed, the corporation that implemented it and licensed it for use on home computers (including the Commodore 64), and, significantly, the hacker ethic of code sharing that allowed BASIC programs to circulate freely.
Ultimately, BASIC became what it was in 1982 thanks to the institution of higher education where it was first developed, the corporation that implemented it and licensed it for use on home computers (including the Commodore 64), and, significantly, the hacker ethic of code sharing that allowed BASIC programs to circulate freely.
−
== Line Numbers and Colons: BASIC's Responses to Changing Hardware(sidebar) ==
+
== Line Numbers and Colons: BASIC's Responses to Changing Hardware (Sidebar) ==
Microsoft has used its position as a corporate supporter of BASIC to make many changes to the language beginning with the days of the Altair, adding and removing pieces that became necessary or obsolete as hardware progressed. For example, to allow programs to be written more compactly--an important feature given the Altair's interface, which could literally be painful to program--Microsoft's Altair BASIC introduced the colon (:) as a separator of statements on the same line. This allowed lines such as:
Microsoft has used its position as a corporate supporter of BASIC to make many changes to the language beginning with the days of the Altair, adding and removing pieces that became necessary or obsolete as hardware progressed. For example, to allow programs to be written more compactly--an important feature given the Altair's interface, which could literally be painful to program--Microsoft's Altair BASIC introduced the colon (:) as a separator of statements on the same line. This allowed lines such as:
Line 156:Line 156:
While line numbers became an iconic feature of BASIC early in the personal computing era, they also contributed to a perception among programmers that the language is limited to simple tasks. Leaving space to add nine new lines of code between every original line may initially seem like plenty of flexibility, but it is rarely enough when programmers have a complex problem to solve. BASIC can still accommodate this situation by allowing the programmer to use GOTO and GOSUB to jump to unused numbers where they can write their new code outside of the existing numbering scheme, then return to the original program flow when it is complete. Unfortunately, the result of doing this is usually what is called spaghetti code--so named because the flow chart of a program becomes so confused and self-referential that all the lines look like a plate of spaghetti, making it nearly unintelligible.
While line numbers became an iconic feature of BASIC early in the personal computing era, they also contributed to a perception among programmers that the language is limited to simple tasks. Leaving space to add nine new lines of code between every original line may initially seem like plenty of flexibility, but it is rarely enough when programmers have a complex problem to solve. BASIC can still accommodate this situation by allowing the programmer to use GOTO and GOSUB to jump to unused numbers where they can write their new code outside of the existing numbering scheme, then return to the original program flow when it is complete. Unfortunately, the result of doing this is usually what is called spaghetti code--so named because the flow chart of a program becomes so confused and self-referential that all the lines look like a plate of spaghetti, making it nearly unintelligible.
−
In 1991 Microsoft realized that the perception of BASIC as limited to simple programs was holding the language back, and that this perception waslargely due to a feature of the language that was no longer even necessary. Nonlinear text editors had long been available, and line numbers were now doing more damage than good. As part of their 1991 QBasic the company deprecated line numbers, replacing them with the assembly-like text labels that had originally been dismissed as inconvenient on the hardware of the era.
+
In 1991 Microsoft realized that the perception of BASIC as limited to simple programs was holding the language back, and that this perception was largely due to a feature of the language that was no longer even necessary. Text editors that could display and allow access to screenfuls, or windowfuls, of lines had long been available, and line numbers were now doing more damage than good. As part of their 1991 QBasic the company deprecated line numbers, replacing them with the assembly-like text labels that had originally been dismissed as inconvenient on the hardware of the era.
−
The simple fact that 10 PRINT includes both the colon and the line number--features that have been added and removed from BASIC in response to hardware changes--locks 10 PRINT into not just a specific set of years, but a specific era of computing caught between competing input mechanisms. Its heritage and provenance is literally written right into its code.
+
The simple fact that 10 PRINT includes both the colon and the line number -- features that have been added and removed from BASIC in response to hardware changes -- signals that 10 PRINT is from a particular time and related to a specific era of computing caught between competing input mechanisms. Its heritage and provenance is literally written right into its code.
== Commodore BASIC==
== Commodore BASIC==

Revision as of 12:47, 12 July 2011

View this revision of BASIC.

Personal tools