Algol
ALGOL (short for ALGOrithmic Language) is a family of imperative computer programming languages originally developed in the mid 1950s which became the de facto standard way to report algorithms in print for almost the next 30 years. It was designed to avoid some of the perceived problems with FORTRAN and eventually gave rise to many other programming languages (including Pascal). ALGOL uses bracketed statement blocks and was the first language to use begin end pairs for delimiting them. Fragments of ALGOL-like syntax are sometimes still used as a notation for algorithms, so-called Pidgin Algol.
Hello World
Since ALGOL 60 had no I/O facilities, there is no portable "Hello World" program in ALGOL. The following code could run on an ALGOL implementation for a Burroughs A-Series mainframe, and is taken from this site.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
BEGIN
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
FILE F (KIND=REMOTE);
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
EBCDIC ARRAY E ;
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
REPLACE E BY "HELLO WORLD!";
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
WHILE TRUE DO
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
BEGIN
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
WRITE (F, *, E);
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
END;
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
END.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
An alternative example, using Elliott Algol I/O is as follows. In fact, Elliott Algol used different characters for 'open-string-quote' and 'close-string-quote', but ASCII does not allow these to be shown here.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
program HiFolks;
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
begin
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
print "Hello world";
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
end;
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Here's a version for the Elliott 803 Algol (A104) The standard Elliott 803 used 5 hole paper tape and thus only had upper case. The code lacked any quote characters so £ (UK Pound Sign) was used for open quote and ? (Question Mark) for close quote. Special sequencies were placed in double quotes e.g. ££L?? produced a new line on the teleprinter.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
HIFOLKS?
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
BEGIN
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
PRINT £HELLO WORLD£L???
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
END?
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Table of Content ~
| ► | Introduction |
| ► | History |
| ► | Properties |
| ► | Code sample (ALGOL 60) |
| ► | Hello World |
| ► | See also |
| ► | External links |
~ What's Hot ~
~ Community ~
| ► | History Forum Come and discuss about History, Civilizations, Historical Events and Figures |
| ► | History Web-Ring A community of sites, blogs and forums dedicated to History. Do not hesitate to submit your site. |
and are licensed under the GNU Free Documentation License.
Lexicon - Privacy Policy - Spiritus-Temporis.com ©2005.
