COMMENT
Algol 68 program to calculate the Sieve of Eratosthenes
for some upper limit N
COMMENT
PROC eratosthenes = (INT n) []INT:
(
[n]INT sieve;
FOR i TO UPB sieve DO
sieve[i] := i
OD;
INT k = ENTIER sqrt(n);
sieve[1] := 0;
FOR i FROM 2 TO k DO
IF sieve[i] NE 0 THEN
FOR j FROM i*i BY i TO n DO
sieve[j] := 0
OD
FI
OD;
sieve
);
INT n;
print("Upper limit to calculate sieve? ");
read(n);
print((eratosthenes(n), newline))
A few things: This code is very readable. The blogger didn't understand it because he didn't understand what the "Sieve of Eratosthenes" did: It's a means of calculating lists of prime numbers. He incorrectly stated that it was used for calculating Fibonacci numbers.Syntax-wise, it looks like some mix of Go, C and Python. Nothing at all unusual. It would be pretty easy to learn to program in this, and comfortable too.
[Edit: The blogger later demonstrated a good understanding of the Sieve of Eratosthenes, but still expressed criticism of Algol68: https://craftofcoding.wordpress.com/2021/04/06/algorithm-35-...]