Solution (source code)

= Solution

For the paper's 26-letter alphabet, use the <Oberon> `CAP` operation and contiguous character codes:
``
PROCEDURE Index(c: CHAR): INTEGER;
BEGIN
  RETURN ORD(CAP(c)) - ORD("A")
END Index;
``
Both cases of a letter map to the same uppercase letter before subtraction, so \b[the result lies in `0..25`]. This relies on the ordinary Latin `A`–`Z` and `a`–`z` character encoding used by <Oberon>; it is not a Unicode case-folding algorithm. The stipulated letter-only <precondition> avoids any need to reject punctuation.