Wednesday 17 October 2018

COMAL (Common Algorithmic Language)

COMAL was a programming language first developed in Denmark in 1973 by Borge R. Christensen and Benedict Lofstedt [1]. The language was a structured language and heavily influenced by contemporary popular educational languages including BASIC and Pascal, indeed the intention of the developers of COMAL was to try and combine the simplicity of BASIC with the power of Pascal [2].

What made COMAL stand out was that it was available for 8-bit microcomputers in the late 1970s and early 1980s and was one of the few structured languages available for those computers at the time. Though like a number of "alternative" languages (like Forth on the Jupiter Ace) BASIC proved impossible to dislodge as the language "everyone" had.

COMAL did have some success though and is still used to this day as a teaching language, it was especially popular in Ireland in the 1980s where Apple supplied around five hundred Apple IIs running COMAL-80 to schools. Earlier versions of COMAL had no graphics commands but these were added later on especially to Commodore implementations of the language which included turtle graphics.

Now for some examples of COMAL, if you are familiar with languages like BASIC then COMAL will seem very familiar:

0010 PRINT "HELLO WORLD"

0010 INPUT AMOUNT
0020 PRINT "PLEASE PAY ", AMOUNT

0010 PRINT "HOW MANY TIMES?"
0020 INPUT TIMES
0030 FOR NO:=1 TO TIMES DO
0040  PRINT "HELLO NUMBER ", NO
0050 NEXT NO

[1] John Kelly, Foundations in Computer Studies with COMAL (2nd Edition) (Educational Company of Ireland, 1984) p. vii
[2] Borge R. Christensen, Beginning COMAL (Ellis Horwood, 1982) p. 6