Algol

From Chessprogramming wiki
Jump to: navigation, search

Home * Programming * Languages * Algol

Algol rotation [1]

ALGOL (ALGOrithmic Language)
is a family of imperative computer programming languages developed jointly by a committee of European and American computer scientists in a meeting in 1958 at ETH Zurich (Algol 58). Algol 58 introduced code blocks and the begin and end pairs for delimiting them. Two years later, Algol 60 was specified, as the result of a meeting in Paris in January 1960 by 13 European and American scientists, Peter Naur, John Backus, John McCarthy, Friedrich L. Bauer, Adriaan van Wijngaarden, et al. Algol 60 became the standard for the publication of algorithms and had a profound effect on future language development, it was the first language implementing nested function definitions with lexical scope. Algol 68 was designed by IFIP, while Niklaus Wirth based his own Algol W [2] on Algol 60 before moving to develop Pascal.

Algol W

A boolean procedure in Algol W from the chess program Awit by Tony Marsland [3] :

11662 LOGICAL PROCEDURE CLEAR(INTEGER VALUE SQA, SQF, SQT);
11663 BEGIN
11664   INTEGER DIR;
11665   LOGICAL FREE;
11666   FREE := FALSE;
11667   DIR := BOTV(EDGE, OFFSET(SQF)−OFFSET(SQT));
11668   IF DIR ~= 0 THEN BEGIN
11669     FREE := TRUE;
11670     IF SQA ~= SQF AND
11671        DIR = BOTV(EDGE, OFFSET(SQA)−OFFSET(SQT))
11672     THEN FREE := FALSE;
11673     FOR SQ := SQF+DIR STEP DIR UNTIL SQT−DIR
11674     DO IF FREE AND BRD(SQ) ~= 0
11675       THEN FREE := FALSE;
11676   END;
11677   FREE
11678 END CLEAR;

Algol Chess Programs

Selected Publications

External Links

References

Up one Level