This Algol 68 code closely follows the C version except that (as in PL/I) the first i and the first j are always one greater.