2001-2026

This is a list of example Algol 68 programs.

Further examples can for instance be found on Rosetta Code that has over a thousand tasks solved in Algol 68.

You can download the current Algol 68 Genie version and its documentation here.

Example Algol 68 programs

File Synopsis Lines
       
ackermann.a68 Ackermann function, a paradigm total computable function that is not primitive recursive. 47
all-parser.a68 Non-left-recursive context-free grammar parser. 59
arithmetic-derivative.a68 Lagarias arithmetic derivate. 42
backtracking.a68 Split an amount of money in coins, by backtracking. 30
bulls-and-cows.a68 Break a unique code of `n' pegs and `m' colours you think of. 72
decision-tree.a68 Paradigm for building decision trees in Algol 68. 67
dictionary.a68 Write Python-style dictionaries in json format. 61
fibonacci-grammar.a68 Illustration of the use of procedure closures. 38
formula-manipulation.a68 Symbolic computing in Algol 68. 277
10  gnome-sort.a68 How a garden gnome sorts a line of flower pots. 74
11  hamming.a68 Compute regular (or Hamming) numbers. 64
12  hilbert-curve-latex.a68 Generate LaTeX code to plot a Hilbert curve. 106
13  hilbert-matrix.a68 Compute the determinant of a Hilbert matrix using fractions. 195
14  linear-regression.a68 Ordinary Least Squares, Principal Component and Partial Least Squares regression. 149
15  lisp-interpreter.a68 Miniature LISP interpreter in Algol 68. 167
16  longest-common-sequence.a68 Compute longest common subsequence of strings. 33
17  lucas-sequence.a68 Lucas sequence and the golden ratio. 36
18  mandelbrot-plotutils.a68 Plot a part of the Mandelbrot set. 56
19  parallel-fft.a68 Parallel Fast Fourier Transform in recursive form. 35
20  partial-parametrisation.a68 Lindsey's currying proposal for Algol 68. 31
21  pebbles.a68 Edsger Dijkstra's pebble problem. 69
22  queens.a68 'N' queens in classic backtracker. 41
23  quicksort.a68 The well-known recursive quicksort algorithm. 32
24  roman-decimal.a68 Translation between decimal and Roman notation. 60
25  triple-ref-trick.a68 The "Algol 68 triple-REF trick" implementation of quicksort. 36
26  tukey-test-tables.a68 Compute Studentized range q table. 57
27  van-wijngaarden-switch.a68 Van Wijngaarden's pseudo-switch. 37
28  warshall.a68 Warshall's algorithm for transitive closures. 64
29  wca.a68 Compute equilibrium Lennard Jones thermodynamic data. 141
30  www.a68 Reading web pages using Algol 68. 18
31  zeroin.a68 Zeroin is a classic root-finding algorithm. 137

Algol 68
Algol 68 Genie
Computer history
Repositories


This website is archived by the National Library of the Netherlands.

© J.M. van der Veer   •   jmvdveer@algol68genie.nl