9

This question was inspired by recent discussion on early keyboards and character sets, and mention in passing about how the COBOL designers were concerned about not using "non-existent" symbols.

Did any computer input device carry all characters required to write Algol 60 as it appeared in the reference language?

The complete set of Algol Basic Symbols (per the Revised Report are these:

Letters: A-Z a-z
Digits: 0-9
Arithmetic operators: + − × / ÷ ↑
Relational operators: < ≤ = ≥ > ≠
Logical operators: ≡ ⊃ ∨ ∧ ¬
Sequential operators: goto if then else for do
Separators: , . ₁₀ : ; := ␣ step until while comment
Brackets: ( ) [ ] ‘ ’ begin end
Declarators: own Boolean integer real array switch procedure
Specificators: string label value
Boolean values: true false

Due to limitations in the site markup language, the symbols that are written in boldface are to be understood as being underlined; the reference language uses underlining (as available on typewriters), though publications often use boldface, as I have done here.

Technically, each underlined word is to be considered as a single indivisible symbol which has no relationship to the individual letters of which it is composed. The same consideration applies to the becomes-symbol := and the subscript-10 symbol ₁₀ (both of which are made up of two characters in this posting).

If I have counted correctly, there are 116 distinct symbols.


I should clarify what I mean by "Did any computer input device carry all characters?".

I do not require that for each basic symbol, that a single keystroke represent the symbol on input. Pretty obviously, it's unlikely to be true in cases such as begin, which is more likely to require at least 7 keystrokes: underline-on, the letters b,e,g,i,n, and underline-off. The operations of underline and overstrike can be used to build up a symbol from parts. Less-than-or-equal might, for example, be underlined-less-than. Not-equals might be equals-backspace-slash. The becomes-symbol can be keyed as plain old colon, equals.

HOWEVER, the printed/displayed symbol should be in some reasonable way look like the symbol in the reference language. So, begin really has to be underlined and lowercase. On the other hand, if there's an implementation that otherwise manages a high degree of fidelity to the Report except that it needs to use some stropping regime (like "begin" for begin), that would be interesting to see.

I'm not concerned for this question with the internal symbol encoding. It's not relevant how many characters-worth of storage it takes to store begin in memory or on disc. This is a question about source-language input.

7
  • 1
    Unicode has both ≔ (U+2254 COLON EQUALS) and ⏨ (U+23E8 DECIMAL EXPONENT SYMBOL).
    – Leo B.
    Sep 6 '20 at 23:38
  • 1
    Not really related to ALGOL, but at least the Sinclair ZX-80 BASIC family used individual character codes for all keywords at the UI level (not just the internal representation). For example to enter PRINT you had to type P at the beginning of a statement line and the interpreter inputted and displayed the “character” PRINT. And that wasn’t a shortcut but a single character, 0xF5. You couldn’t use P followed by R followed by... etc. even if you wanted to. Also, >= was one character code, distinct from the combination of > followed by =. And so on. So, such things have been done. Sep 7 '20 at 2:19
  • The KDF9 software (the PROMPT program development system, or Eldon2 multi-access system, which used PROMPT disc formats) encoded all Algol Basic Symbols as 8-bit values. It was the job of the input device handlers to convert from device representation (and character code; cards, paper tape, and printers were all different) to Algol Basic Symbols. For online access, a PDP-8 handled the terminals, and assembled symbols from its input stream: so !BEGIN on an ASR 33 would end up as the single 8-bit symbol begin, before the Algol compiler even saw it. Sep 7 '20 at 2:32
  • Were the underlines a required part of the language, or were they only markup in the documents describing the language to indicate an indivisible token? Sep 7 '20 at 8:39
  • I don't recall any of the B5000 peripherals having anything approaching the full set, in fact I think they were an early user of digraphs. However I believe that they used a Friden as the controlling terminal (SPO), and there were a small number of cases where × (multiply) was required in a typed command or equivalent punched card. Sep 7 '20 at 8:43
8

Except for the full set of upper- and lowercase letters, there was. The Soviet character encoding standard GOST 10859-64 included all of the ALGOL-60 special characters, and there were card punchers controlled by electric typewriters (Consul-260) with a standard-compliant character set.

GOST 10859 keyboard

Note the lack of distinct Latin letters graphically equivalent to Cyrillics, allowing to fit all special characters into a regular keyboard.

Given that the ALGOL-60 Revised Report says, with regard to letters (2.1),

This alphabet may arbitrarily be restricted, or extended with any other distinctive character (i.e. character not coinciding with any digit, logical value or delimiter).

of interest is the fidelity of representation of non-alphanumeric characters, which is achieved 100%, and of the keywords, which can be achieved by underlining or double-striking.

10
  • By the way, ⏨ was standard on some ASR 33 teletypes; the aforementioned KDF9, running the Eldon2 multiaccess system, used teletypes. Algol 60 representation was painful in some spots, but oddly not for ⏨. Sep 7 '20 at 2:20
  • 1
    @another-dave Then it is surprising that ⏨ had not made its way into any character encoding in the U. S. and nobody had the thought to include it in Unicode. I'm glad that I petitioned the Unicode committee to encode ⏨ when there was still some space available in the U+23xx region.
    – Leo B.
    Sep 7 '20 at 6:54
  • The Algol user guide and terminal-system user manuals refer to the teletype as using 'ISO code'. There's no picture of a keyboard and nor are teletype character codes given (this latter would be only be of concern to the PDP-8 front end, which converted to/from internal system encoding). I suppose by a process of elimination I might figure out what ⏨ replaced. Sep 7 '20 at 16:49
  • @another-dave Given the options, it could have been an ampersand, a backslash, or a single quote.
    – Leo B.
    Sep 8 '20 at 4:21
  • 1
    @texdr.aft Yes, I am. I got annoyed that my BESM-6 emulator could not output all characters properly; and being able to attend a Unicode technical committee meeting in person helped. Actually, there was another annoyance: Unicode did not have less/greater than with slanted equal ⩽⩾ at first, only ≤≥, but they were added quickly enough without my intervention.
    – Leo B.
    Jun 30 at 16:31
3

For clarity, I decided to move the KDF9 part of my question to an answer, since that is what it really is... I have no intention of accepting my own answer.


My submission for "most nearly fulfilling the requirements" was Algol 60 on the English Electric KDF9 using paper tape prepared on a Friden Flexowriter. The Flexowriter had two cases of letters, and could do underlining.

So: letters, digits, underlined words: no problem. For the rest of the symbols, all were available except the following:

Logical-operators: ≡ ⊃ ∨ ∧ ¬ replaced by eqv imp or and not

String quotes: ‘ ’ replaced by [ ] (underlined brackets)

Space indicator in strings: ␣ replaced by *

These symbols were produced by underlining: ≤ ≥

and this by overstrike: ≠

So, out of 116 symbols to be represented, 8 could not be presented as they appear in the Report. I award the KDF9-and-Flex combination a score of 108/116.

Is this the closest any implementation can come to absolute fidelity?

(Note, things got very sad if you subsequently wanted to print out your program on a lineprinter rather than punching tape for Flexowriter interpretation).

2
  • I wonder if the ICL Algol compiler was derived from the English Electric one.since ICL took over the EE computer section. It didn't have overstrikes: It use # for ≠, % for spaces and alphabetic equivalents for ≤ ≥. chilton-computing.org.uk/acl/literature/manuals/icl1906a/…
    – cup
    Sep 7 '20 at 7:17
  • No, they're unrelated. (KDF9 had two independent compilers - Whetstone Algol, Kidsgrove Algol; ICT/ICL had several, though maybe there was a common core. I have used #XALM [I think] on a 1903). The Chilton guys might have written their own compilers anyway. Sep 7 '20 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.