BASIC

From Maze

(Difference between revisions)
Jump to: navigation, search
(Added sidebar on $)
(Added info about telegraph codes)
Line 49:Line 49:
Computers are fundamentally machines to add and multiply; the accounting and commercial functions that they carry out are much higher-level. So it is a curious circumstance that the Commodore 64 keyboard, like modern North American keyboards, has a dollar sign on it but does not have a multiplication sign. Instead, the asterisk (*), a typographical mark used to indicate a footnote, is pressed into service as the symbol for multiplication.
Computers are fundamentally machines to add and multiply; the accounting and commercial functions that they carry out are much higher-level. So it is a curious circumstance that the Commodore 64 keyboard, like modern North American keyboards, has a dollar sign on it but does not have a multiplication sign. Instead, the asterisk (*), a typographical mark used to indicate a footnote, is pressed into service as the symbol for multiplication.
−
Kemeny and Kurtz point to part of the rationale for this. Computers began using Teletypes as interfaces very early on, but the Teletype predated the computer and was used as a means of textual communication from early in the 20th century. The remote typewriter used to transmit commercial information, such as dollar amounts, much more often than it was used for sending mathematical equations.
+
Kemeny and Kurtz point to part of the rationale for this. When they were developing BASIC, they may have been looking at a just-released ASR-33 Teletype -- this light-duty office model was used with the Dartmouth Time-sharing System and many other minicomputers. But even though interactive (as opposed to batch) processing was a novelty, teletypewriters has been used as interfaces to computers long before this. Various sorts of TTYs, teleprinters, or "printing telegraphs" were used commercially as a means of textual communication beginning in the 1910. These systems were used to transmit dollar amounts much more often than they were used for sending mathematical equations. They were based on pre-ASCII characters codes that came from telegraphy, the two International Telegraph Codes. These were the 1870 Baudot Code and the 1901 revision of this for a typewriter keyboard, Murray Code. Murray Code is a 5-bit code that includes two characters that allow "shifting" into alternate sets. A shifted "D" represents "$" in Murray Code.
−
Of course, the origin of the Teletype in the United States is another important reason that the dollar sign was on Typetypes and was later used in computing and in BASIC. The original, North American Commodore 64 keyboard also sported a pound sterling sign (£), a sure indicator that Commodore planned to sell the computer in the United Kingdom.
+
Of course, the origin of the Teletype in the United States is another important reason that the dollar sign was on Typetypes and was later used in computing and in BASIC. The original, North American Commodore 64 keyboard also sported a pound sterling sign (£), absent from other U.S. computers of the time. The seemed to be a clear indicator of Commodore's plans to sell the computer in the United Kingdom, although it had a precedent in Murray Code, which also features a pound sterling sign.
The dollar sign is still used in some of today's workhorse programming languages, such as Perl and PHP. In both of these, it is used to indicate a variable by being placed at the beginning, rather than the end, of the variable name. In Perl it specifically indicates a ''scalar'' variable, since $ looks like S for scalar.
The dollar sign is still used in some of today's workhorse programming languages, such as Perl and PHP. In both of these, it is used to indicate a variable by being placed at the beginning, rather than the end, of the variable name. In Perl it specifically indicates a ''scalar'' variable, since $ looks like S for scalar.

Revision as of 12:23, 10 July 2011

View this revision of BASIC.

Personal tools