BASIC

From Maze

(Difference between revisions)
Jump to: navigation, search
(Style and other small edits.)
(→A Brief History of Programming)
Line 21:Line 21:
During the first decade of electronic computing, programming was still crawling toward the ideal of Lovelace's "programs" that specified algorithms in high-level, human-readable form. To reach a level of programming more appropriate for mathematical and scientific tasks, FORTRAN (Formula Translation) was specified in 1954 and first implemented in 1957. This language, and particularly the following version it, FORTRAN II from 1958, was a very strong influence on BASIC. Programming languages were developed for other purposes as well. To address business uses, COBOL was specified in 1959 and implemented in 1960. FORTRAN and COBOL both allowed for more intelligible code, improving on assembly, but both were also developed for the context of batch processing, for use with stacks of punched cards. Specifically, they were developed for what became known as simply "the IBM card," IBM's 1928 punched card that had 80 columns. (As explained in the chapter "Regularity," the Commodore 64's 80-column logical line, which appears as two 40-column lines on the screen, is one legacy of this early material medium for computing.) Programs written in early versions of COBOL and FORTRAN were specific to the punched card in certain ways: COBOL reserved columns 1-6 for the line number and column 7 for a continuation mark if the card's code ran on from the previous one. FORTRAN was similar, with columns 1-5 indicating the statement number. "Comments" (usually the program name) went in columns 73-80 in both languages; a "C" in the first column indicated that the whole FORTRAN card was to be considered a comment. Unless a programmer wrote a one-liner -- which in this case means writing a program that fits on a single card -- a COBOL or FORTRAN program would manifest itself as a stack, often a massive one, of punched cards. These had to be punched on a keypunch machine and fed into a card reader by an operator. Line numbers were of great importance in one particular situation: if someone dropped the stack of cards and they needed to be sorted into order.
During the first decade of electronic computing, programming was still crawling toward the ideal of Lovelace's "programs" that specified algorithms in high-level, human-readable form. To reach a level of programming more appropriate for mathematical and scientific tasks, FORTRAN (Formula Translation) was specified in 1954 and first implemented in 1957. This language, and particularly the following version it, FORTRAN II from 1958, was a very strong influence on BASIC. Programming languages were developed for other purposes as well. To address business uses, COBOL was specified in 1959 and implemented in 1960. FORTRAN and COBOL both allowed for more intelligible code, improving on assembly, but both were also developed for the context of batch processing, for use with stacks of punched cards. Specifically, they were developed for what became known as simply "the IBM card," IBM's 1928 punched card that had 80 columns. (As explained in the chapter "Regularity," the Commodore 64's 80-column logical line, which appears as two 40-column lines on the screen, is one legacy of this early material medium for computing.) Programs written in early versions of COBOL and FORTRAN were specific to the punched card in certain ways: COBOL reserved columns 1-6 for the line number and column 7 for a continuation mark if the card's code ran on from the previous one. FORTRAN was similar, with columns 1-5 indicating the statement number. "Comments" (usually the program name) went in columns 73-80 in both languages; a "C" in the first column indicated that the whole FORTRAN card was to be considered a comment. Unless a programmer wrote a one-liner -- which in this case means writing a program that fits on a single card -- a COBOL or FORTRAN program would manifest itself as a stack, often a massive one, of punched cards. These had to be punched on a keypunch machine and fed into a card reader by an operator. Line numbers were of great importance in one particular situation: if someone dropped the stack of cards and they needed to be sorted into order.
−
FORTRAN's GOTO command was the basis for the GOTO in the original BASIC, which of course was carried over into Commodore 64 BASIC. GOTO functions in the same way the assembly language JMP does. There is not much of an advantage to using BASIC if one is simply interested in easily writing JMP, but other BASIC commands, such as PRINT, allow one to very efficiently accomplish what would take very many machine-language operations.
+
FORTRAN's GOTO command was the basis for the GOTO in the original BASIC (MoP p. 86), which of course was carried over into Commodore 64 BASIC. GOTO functions in the same way the assembly language JMP does. There is not much of an advantage to using BASIC if one is simply interested in easily writing JMP, but other BASIC commands, such as PRINT, allow one to very efficiently accomplish what would take very many machine-language operations.
The creators of BASIC were seeking to develop a programming language for the next computing revolution, one that would go beyond punched cards and batch processing to allow numerous users interactive access to a system simultaneously. This revolution was time-sharing.
The creators of BASIC were seeking to develop a programming language for the next computing revolution, one that would go beyond punched cards and batch processing to allow numerous users interactive access to a system simultaneously. This revolution was time-sharing.

Revision as of 17:53, 7 July 2011

View this revision of BASIC.

Personal tools