Plankalkül – the first language (ii)

submited by
Style Pass
2021-06-24 00:00:11

In 1976 Donald E. Knuth and Luis Trabb Pardo produced a technical report titled “The Early Development of Programming Languages” [1]. In it they surveyed the evolution of high level programming languages from 1945-1958, describing each languages principal features, and comparing them using a particular algorithm which they called the “TPK algorithm”. Below is a reproduction of the program implemented in Plankalkül, with relevant components of the program highlighted. It provides one of the best (and simple) illustrations of a Plankalkül program [1].

Now for a brief explanation. LIne 1 introduces the data types A2 which is basically an ordered pair comprised of an integer and a floating-point component. The lines in ② and ③ comprise the function f(t), while the lines in ④-⑦ comprise the main program TPK. In reality the program is only 7 lines in length, with each operation spanning several lines. Operations are performed on “Resultatwerte“, or output variables, “Variablen“, or input variables, and “Zwischenwerte” or intermediary variables.

Lines 2-4 indicate that P1 is a procedure that takes V0 (of type A∆1, i.e. floating-point) as input and produces R0 of the same type. Lines 5-7 perform the functions calculation.

Leave a Comment