Tutorial for ALGOL 68 (ALGOrithmic Language). We use the Algol 68 Genie compiler.
All the examples are located in the examples
directory.
- Download an algol compiler.
- Windows: Algol 68 Genie.
- Rename the compiler
a68g-2.8.3.exe
toa68g.exe
. - Put the compiler in a directory in your
%PATH%
.
- Rename the compiler
- Windows: Algol 68 Genie.
- Write the
hello.a68
file with following content:
printf(($14a$, "Hello World!!!"))
- Run the file: on Windows open a cmd and type
a68g hello.a68
. - You should see
$> a68g hello.a68
Hello World!!!
Algol is not very in used today, but do you know a language that can do what follows in an easier way?
You want to calculate pi with a lot of precision? Just do:
a68g -p "long long pi" --precision=1000
Just replace 1000 with 10000 or more!
To continue, go to see all the examples.
- Feel free to participate. Correct any errors. Make suggestions. Create more examples.
Jean-Louis GUENEGO jlguenego@gmail.com