BASIC
From Maze
(Difference between revisions)
(→Dartmouth BASIC and Time-Sharing Minicomputers) | (→Dartmouth BASIC and Time-Sharing Minicomputers) | ||
| Line 25: | Line 25: | ||
== Dartmouth BASIC and Time-Sharing Minicomputers == | == Dartmouth BASIC and Time-Sharing Minicomputers == | ||
| − | In 1962, change was sweeping through the remote Dartmouth campus. Time Magazine noted late that year, in article that declared the college was coming "out of the woods," that the school had built a major new arts center and that John Kemeny, who had made full professor at age 27, had built "the best college math department in the country." [http://www.time.com/time/magazine/article/0,9171,829487-1,00.html] The year, Kemeny and his colleague Thomas Kurtz had started developing a time-sharing system and a new programming language for the education of all students at Dartmouth -- not just those studying math, science, or engineering. "While the availability of FORTRAN extended computer from a handful of experts to thousands of scientific users," Kemeny wrote, "we at Dartmouth envisaged the possibility of millions of people writing their own computer programs." (Man and the Computer p.30) | + | In 1962, change was sweeping through the remote Dartmouth campus. Time Magazine noted late that year, in article that declared the college was coming "out of the woods," that the school had built a major new arts center and that John Kemeny, who had made full professor at age 27, had built "the best college math department in the country." [http://www.time.com/time/magazine/article/0,9171,829487-1,00.html] The year, Kemeny and his colleague Thomas Kurtz had started developing a time-sharing system and a new programming language for the education of all students at Dartmouth -- not just those studying math, science, or engineering. They aimed to make a radical improvement in access to computers and to computer programming. "While the availability of FORTRAN extended computer from a handful of experts to thousands of scientific users," Kemeny wrote, "we at Dartmouth envisaged the possibility of millions of people writing their own computer programs." (Man and the Computer p. 30) |
| − | Kemeny and Kurtz sought to significantly lower the barriers to programming. They considered developing a subset of FORTRAN or Algol, but found this unsuitable and set to work, with a team of undergraduates, developing a new language (Masterminds of Programming p. 79). They saw the value of an interactive time-sharing system for allowing users to quickly correct minor errors rather than coming back 24 hours later with a new stack of punched cards for their next scheduled batch job. They also relaxed some of the specific requirements that were tied to using keypunch machines and cards. Kurtz told an interviewer, "we wanted ... to get away from the requirements that punched cards imposed on users, which was that things had to be on certain columns on the card." (Masterminds of Programming p. 81) Oddly enough, spaces between BASIC tokens were optional, and extra spaces were ignored, because, as Kurtz put it, "some people, especially faculty members, couldn't type very well." (MoP p. 81) This aspect of Dartmouth BASIC was carried over onto the Commodore 64. | + | To reach millions, Kemeny and Kurtz would clearly have to significantly lower the existing barriers to programming, barriers which were related not only to the nature of programming languages but to the material nature of programming. The two began development of DTSS, the Dartmouth Timesharing System, and with it the BASIC programming language. They considered developing a subset of FORTRAN or Algol, but found this unsuitable and set to work, with a team of undergraduates, developing a new language (Masterminds of Programming p. 79). They saw the value of an interactive time-sharing system for allowing users to quickly correct minor errors rather than coming back 24 hours later with a new stack of punched cards for their next scheduled batch job. They also relaxed some of the specific requirements that were tied to using keypunch machines and cards. Kurtz told an interviewer, "we wanted ... to get away from the requirements that punched cards imposed on users, which was that things had to be on certain columns on the card." (Masterminds of Programming p. 81) Oddly enough, spaces between BASIC tokens were optional in Dartmouth's versions of the language, and extra spaces were ignored, because, as Kurtz put it, "some people, especially faculty members, couldn't type very well." (MoP p. 81) This aspect of Dartmouth BASIC was carried over onto the Commodore 64, as mentioned in the first Remark. |
BASIC was designed in other ways to help new programmers, with "error messages that were clear and friendly" and default options that would satisfy most users' needs (9). "If the expert needs something fancier," Kemeny and Kurtz declared, "let the expert do the extra work!" (11). And, BASIC was meant to be a true high-level language, so that programmers would not need any detailed knowledge of the specific hardware being used (9). | BASIC was designed in other ways to help new programmers, with "error messages that were clear and friendly" and default options that would satisfy most users' needs (9). "If the expert needs something fancier," Kemeny and Kurtz declared, "let the expert do the extra work!" (11). And, BASIC was meant to be a true high-level language, so that programmers would not need any detailed knowledge of the specific hardware being used (9). | ||
| − | While BASIC didn't require that programmers put things in certain columns, there was a requirement that something be put at the beginning of each line: A line number, such as "10." This facilitated branching, of course; the GOTO and GOSUB statements refer to the line numbers where program flow should continue. Although often associated with BASIC, GOTO did not originate with Kemeny and Kurtz's language. FORTRAN already had a GOTO statement, which was the basis for the one in BASIC (Kurtz p. 86). Before that, the unconditional branch was a feature of assembly and machine languages and did the same thing as GOTO. | + | While BASIC didn't require that programmers put things in certain columns, there was a requirement that something be put at the beginning of each line: A line number, such as "10." This facilitated branching, of course; the GOTO and GOSUB statements refer to the line numbers where program flow should continue. Although often associated with BASIC, GOTO did not originate with Kemeny and Kurtz's language. FORTRAN already had a GOTO statement, which was the basis for the one in BASIC (MoP p. 86). Before that, the unconditional branch was a feature of assembly and machine languages and did the same thing as GOTO. |
While numbered lines were to some extent helpful for branching, BASIC did not actually need line numbers for this purpose. Labels, such as those used in assembly, would have sufficed, and indeed they do suffice in later versions BASIC that do not use line numbers. The line number's real value is seen on a teletype or other print terminal, or in any environment where full-screen editing is not an option. Line numbers made it easy in those cases to delete existing lines; simply type the line number without any further instructions, and the line disappears. To correct a single existing line, it's possible to simply retype the line with the same line number. | While numbered lines were to some extent helpful for branching, BASIC did not actually need line numbers for this purpose. Labels, such as those used in assembly, would have sufficed, and indeed they do suffice in later versions BASIC that do not use line numbers. The line number's real value is seen on a teletype or other print terminal, or in any environment where full-screen editing is not an option. Line numbers made it easy in those cases to delete existing lines; simply type the line number without any further instructions, and the line disappears. To correct a single existing line, it's possible to simply retype the line with the same line number. | ||
| Line 37: | Line 37: | ||
The practice of numbering program statements by multiples of five or ten is not merely aesthetic; the insertion of new lines in a program requires that, as the 1964 manual puts it, "the original line numbers <ins>not</ins> be consecutive numbers" (22). Numbering a program 10, 20, 30, and so on ensured that between every existing program statement there was room for nine more. It was an acknowledgement that the program is dynamic rather than fixed and perfect. The ''Commodore 64 User's Guide'' also advises that "it is good programming practice to number lines in increments of 10--in case you need to insert some statements later on" (33). | The practice of numbering program statements by multiples of five or ten is not merely aesthetic; the insertion of new lines in a program requires that, as the 1964 manual puts it, "the original line numbers <ins>not</ins> be consecutive numbers" (22). Numbering a program 10, 20, 30, and so on ensured that between every existing program statement there was room for nine more. It was an acknowledgement that the program is dynamic rather than fixed and perfect. The ''Commodore 64 User's Guide'' also advises that "it is good programming practice to number lines in increments of 10--in case you need to insert some statements later on" (33). | ||
| − | Dartmouth's own time-sharing system, DTSS, and the versions of BASIC that ran on it served almost all of the students at that college - Kemeny stated in 1971 that 90% of seven classes of freshmen had received computer training. Access to Dartmouth's system extended to many other campuses, and it was not the only time-sharing system with BASIC. Before the microcomputer revolution, other college and university students were taking required courses in computing using BASIC - at NYU's business school, for instance. Even before the arrival of home computers with built-in BASIC, the language had extensive, if not pervasive, influence. And even before the microcomputer era and the full toppling of BASIC's Tower of Babel, the permissive attitude of Kemeny and Kurtz had led to many different implementations of BASIC for different systems. Writing in 1975, one author commented: "BASIC systems differ among themselves in much the same way that the English langauge as we know it differs among the English-speaking nations around the globe." (Mullish p. 6) | + | DTSS and the versions of BASIC that ran on it served almost all of the students at that college - Kemeny stated in 1971 that 90% of seven classes of freshmen had received computer training. Access to Dartmouth's system extended to many other campuses, and it was not the only time-sharing system with BASIC. Before the microcomputer revolution, other college and university students were taking required courses in computing using BASIC - at NYU's business school, for instance. Even before the arrival of home computers with built-in BASIC, the language had extensive, if not pervasive, influence. And even before the microcomputer era and the full toppling of BASIC's Tower of Babel, the permissive attitude of Kemeny and Kurtz had led to many different implementations of BASIC for different systems. Writing in 1975, one author commented: "BASIC systems differ among themselves in much the same way that the English language as we know it differs among the English-speaking nations around the globe." (Mullish p. 6) |
| + | |||
| + | [More on DTSS and its significance.] | ||
== Altair BASIC and Tiny BASIC, Micro-Soft and Copyleft == | == Altair BASIC and Tiny BASIC, Micro-Soft and Copyleft == | ||
