COMAL


COMAL is a computer programming language developed in Denmark by Benedict Løfstedt and Børge R. Christensen in 1973. COMAL was one of the few structured programming languages that was available for and comfortably usable on 8-bit home computers. It was based on the seminal BASIC programming language, adding multi-line statements and well-defined subroutines among other additions.
The "COMAL Kernel Syntax & Semantics" contains the formal definition of the language. Further extensions common to many implementations are described in.

Design

COMAL was created as a mixture of the prevalent educational programming languages of the time, BASIC, Pascal, and, at least in the Commodore and Compis versions, the turtle graphics of Logo. The language was meant to introduce structured programming elements in an environment where BASIC would normally be used.
With the benefit of hindsight, COMAL looks like a Structured BASIC that has reasonably well-written, vendor neutral, free, standards. It is never necessary to use GOTO, and line numbers are purely for editing purposes rather than flow control. Note, however, that the standardised language only supports control structuring, not data structuring such as records or structs.

History

In the early 1980s, Apple Computer won a contract to supply Apple II computers running CP/M and COMAL to Irish secondary schools. It was popular for education and some textbooks were locally written.
In 1984 Acornsoft released a COMAL implementation, by David Christensen, Jim Warwick and David Evers, for their 8-bit BBC Micro and Acorn Electron computers
Between 1984-1987 TeleNova, a subsidiary of the industrial arm of the Swedish Telecoms system, Teli industrier manufactured a desktop PC called "Compis" for the educational sector. An enhanced version of COMAL was supplied as the standard programming language for this PC. Versions were created for both CP/M-86 and MS-DOS. The latter version is available for Windows XP. The reference manual is
In 1990 Thomas Lundy and Rory O'Sullivan produced the definitive text on COMAL Programming. They matched and compared COMAL with BBC Structured Basic.
As of 2016 COMAL is still actively in use as an educational programming language. Some high schools in the United Kingdom continue to use it to teach the subject of Computing.

Availability

COMAL was available for:

"Hello, world!"


PRINT "HELLO, WORLD!"

Conditions


IF condition THEN
instructions
ENDIF

Loops


FOR number:= 1 TO 1000 DO
PRINT number
ENDFOR

Print statements with variables


INPUT "What's your favourite number? " :nmr#
PAGE
PRINT "Your favourite number is " ; nmr#