A3 = ( | S1 · 4 | ) |
B3 |
expresses that S1 · 4 is subjected to the restriction B3.^{6}
Zuse calls object Angaben which pretty closely corresponds
to "data".
Figure 1 shows an illustrative section [Z59].
V, 0 |
Z, 0 |
Z, 1 |
R 0 |
Finally, programs and subroutines have their own identifiers like
R 0 |
R17 0 |
V 0 |
V 0 i |
(0 i < l) |
V 0 i·j |
(0 j < m) |
V 0, i |
V 0 i·j·k |
(0 k < n) |
V 0, i·j |
Furthermore, variable component subscripts can be used [Z70, p. 123], for example by the help of an intermediate value in the form
µx(x | V ^ R(x)) 0 |
-- K. Zuse (1970)
The program (Figure 3) checks these conditions: (2) serves for the special case of condition 1. (3) and (4) are initializations for the repetitive statement which checks condition 2 and the count 5. Condition 3 for the final case is then checked in (11) and the count 4 in (12). The program, by the way, contains mistakes: for example, a count corresponding to (7) is missing for the first symbol. More seriously, the condition x V0[0] in (5) should be read as x = V0[i] ^ i 0.
For a direct transliteration of Zuse's (corrected) procedure, we assume first that suitable Boolean procedures Va(x), Op(x), etc., are declared. Using these predicates, we obtain in ALGOL 68 (the encircled numbers refer to Figure 3):
mode | A1 = int | co coordinates 1, ..., 8 instead of 0, ..., 7 corresponding to [0:2] bool co, \ | |
A2 = [1:2] A1 | co point co, | ||
A3 = int | co occupation by 1, ..., 6 (9, ..., 14) for white (black) Q, K, R, B, S, P; instead of 0 for unoccupied co, | ||
A4 = struct | (A2 point, A3 occ) co occupation of the point co, | ||
A5 = [1:64] A4 | co occupation of the board co; | ||
proc | R17 | co adjacent co = (A2 V0, V1) bool : abs (V0[1] - V1[1]) <= 1 ^ abs (V0[2] - V1[2]) <= 1; | |
proc | R128 | co move permissible co = (A5 V0, A2 V1, V2) bool : <<corresponding to the occupation occ of V0[i] that belongs to V1, where point of V0[i] = V1, the move from V1 to V2 is geometrically permissible>> ^ <<intermediate fields, if any, are free>>; | |
1) | proc | R148 | co move 2 (wK) permissible co = (A5 V0, ref A2 px) bool :
co additional result parameter px for reference to target co begin bool c co if already checked, px refers to permissible target co := false; |
2) |
int i := 1; while occ of V0[i] 2 do i +:= 1; A4 Z0 = V0[i]; | ||
3) |
for j to 64 while ¬c do begin A4 x = V0[i]; px := point of x; c := R17 (point of Z0, px) ^ occ of x >= 8; | ||
4) |
for k to 64 while c do begin A4 y = V0[k]; if occ of y > 8 then c := ¬R128 (V0, point of y, px) fi end end; c end |
[ ? Troszdern glaube ichm dass der... Plankalkül noch einmel praktische Bedeutung bekommen wird. ? ]