Typography and BASIC
From Maze
The Semicolon in BASIC
One of the most easily overlooked elements of the 10 Print program is the semicolon. The semi-colon tells BASIC to display the / and \ characters serially, across the screen, column by column. When the 40th column is reached, the characters continue at the beginning of the next line, as with a typewriter carriage return. Were the semicolon to be removed (as happens with one example in the variorum), the program will display each / or \ on a separate line, thereby rendering a vertical semi-continuous zigzag. In other words, there's exactly one character textually that means the difference visually between a column and a maze. The semicolon resists enjambment.
Where does the power of the semicolon come from? How did this single character--which has entirely different uses in programming languages such as PHP and Python--come to mean continuous serial display?
The answer lies in the origins of BASIC and in how programmers typically interacted with computers in the mid-sixties--via teletype machines. The original 1964 manual for BASIC provides some telling details about this interaction between users and machine. Consider these facts:
First, as would have been the case with any computer at the time, all of the output would have appeared on a teletype printer and not on a screen. The PRINT X command would have literally meant "print X on paper." This might be obvious to computer historians, but it's not historical context readily available to many contemporary computer users.
Second, BASIC divided every teletype line into 5 zones of 15 characters ("spaces") each, thereby allowing "the printing of up to five numbers per line" (a description which already gives us some clues as to what sort of thing people would be expected to be doing with their computers).
Third, the comma tells the teletype printer to skip to the next print zone (i.e. the next zone of 15 spaces) on the same line. Unless it's the fifth zone, in which case the comma sends the printer to the beginning of the next teletype line.
Fourth, here is what the manual has to say about the semicolon:
A packed form of output is available by using the character ";" instead of ",". Briefly, whereas "," tells the computer to move to the next zone for the next answer, ; tells the computer to move to the beginning of the next multiple of three characters for the next answer instead of to the next zone, with six characters being the minimum. One can thus pack many more than five numbers on a line if the numbers themselves require less than a full zone to print. With packed output using the semi-colon, the programmer can print 11 three digit numbers per line, 8 six digit numbers per line, or 6 nine digit numbers per line. (p. 34)
It's clear, then, that both the comma and semicolon as they are used in BASIC in the seventies and eighties are legacies of print[er] culture and have little to do with formatting on the screen. They were also accommodations for printing NUMBERS, not letters, and certainly not graphical characters.
The Semicolon and the Commodore 64
The 1981 Commodore Basic manual reveals that the early version of BASIC's notion of dividing each teletype line into "print zones" was translated to the Commodore.
As the Commodore manual explains:
The position of each printed item is determined by the punctuation used to separate the items in the list. BASIC divides the line into print zones of 10 spaces each. In the list of expressions, a comma causes the next value to be printed at the beginning of the next zone. A semicolon causes the next value to be printed immediately after the last value.
This means, of course, that using a comma instead of a semicolon---changing just a single character in 10 Print---produces a radically different design, more hieroglyphic than labyrinth:
10_print_glyph.png
384 × 272 pixels
Someone in the eighties might have easily discovered this variation on his/her own, monkeying around with the program. But without knowing about the original BASIC's reliance upon teletype printers for output (an output, furthermore, that was expected to be columns of numbers), the reason for the variation between comma and semicolon would be obscure, if not seemingly utterly arbitrary.
