kernelthread.com

Algol-60

The Towers of Hanoi for the Algol-60 programming language.

ALGOL (ALGOrithmic Language) is one of several high level languages designed specifically for  programming scientific computations. It started out in the late 1950's, first formalized in a report titled ALGOL 58, and then progressed through reports ALGOL 60, and ALGOL 68. It was designed by an international committee to be a universal language. Their original conference, which took place in Zurich, was one of the first formal attempts to address the issue of software portability. ALGOL's machine independence permitted the designers to be more creative, but it made implementation much more difficult. Although ALGOL never reached the level of commercial popularity of FORTRAN and COBOL, it is considered the most important language of its era in terms of its influence on later language development. ALGOL's lexical and syntactic structures became so popular that virtually all languages designed since have been referred to as "ALGOL - like"; that is they have been hierarchical in structure with nesting of both environments and control structures.

More information on ALGOL can be had from the Google ALGOL Directory.

'begin' 'comment' The Towers Of Hanoi Algol-60 Copyright (C) 1999 Amit Singh. All Rights Reserved. http://hanoi.kernelthread.com ; 'procedure' movedisk(n, f, t); 'integer' n; 'integer' f; 'integer' t; 'begin' outstring (1, "move "); outinteger(1, f); outstring (1, " --> "); outinteger(1, t); outstring (1, "\n"); 'end'; 'procedure' dohanoi(n, f, t, u); 'integer' n; 'integer' f; 'integer' t; 'integer' u; 'begin' 'if' n < 2 'then' movedisk(1, f, t) 'else' 'begin' dohanoi(n - 1, f, u, t); movedisk(1, f, t); dohanoi(n - 1, u, t, f); 'end'; 'end'; dohanoi(3, 1, 3, 2); 'end'

Download

hanoi.a60