Typography and BASIC
From Maze
The Semicolon
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.
