This article needs additional citations for verification. (January 2013) (Learn how and when to remove this template message)
|Designed by||Børge R. Christensen, Benedict Løfstedt|
COMAL (Common Algorithmic Language) is a computer programming language developed in Denmark by Børge R. Christensen and Benedict Løfstedt and originally released in 1975. 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.
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.[original research?] 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 (commercial implementations such as UniCOMAL 3 supported this as an extension).
COMAL was originally developed in Denmark by mathematics teacher Børge R. Christensen. The school in which he taught had received a Data General NOVA 1200 minicomputer in 1972, with the expectation that the school would begin to teach computer science. Christensen, who had taken a short course on the subject at university, was expected to lead the program and to maintain the computer system. The NOVA 1200 was supplied with Data General Extended BASIC, and Christensen quickly became frustrated with the way in which the unstructured language led students to write low-quality code that was difficult to read and thus mark. Christensen met with computer scientist Benedict Løfstedt, who encouraged him to read Systematic Programming, the then-new book on programming language design by Niklaus Wirth, the creator of Pascal. Christensen was impressed, but found that he could not use Pascal directly, as it lacked the interactive shell that made BASIC so easy for students to develop with. Over the next six months Christensen and Løfstedt corresponded by mail to design an alternative to BASIC which retained its interactive elements but added structured elements from Pascal. By 1974 the language's definition was complete but Christensen was unsuccessful in attracting interest from software firms in developing an implementation. He therefore worked with two of his students, to whom he had taught NOVA 1200 machine language, to write an implementation themselves, over another six months. The first proof-of-concept implementation (running a five-line loop) was ready on 5 August 1974, and the first release (on paper tape, as this was what the NOVA 1200 used for input-output) was ready in February 1975. Development costs had been around US$300. Only now did the system (which had previously used an internal Danish name) pick up the name COMAL, for Common Algorithmic Language, inspired by ALGOL, with which Christensen had been experimenting. The first release was therefore named COMAL 75. Christensen subsequently wrote a textbook on the language which evolved into Beginning COMAL.
In 1978, Christensen began to adapt COMAL such that it would run on microcomputers, which were becoming available, worried that without such an implementation he would be required to teach and use BASIC again as Danish schools acquired the new machines. By 1980 a version of COMAL developed in conjection with a college group was able to run on the Zilog Z80, and thus COMAL 80 was released. Around the same time, a Danish firm introduced the Comet, a very capable microcomputer for the time, which would be the first machine to run a version of what would look like the later COMAL releases. Christensen subsequently stepped back from COMAL development around 1980-81, which was handed over to groups including UniComal, started by Mogens Kjaer, who had written to Christensen with critiques of COMAL and subsequently ported it to the Commodore PET for release 0.14. At this time, Danish schools insisted that COMAL be available on any microcomputer they purchased.
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 (with a manual by Paul Christensen and Roy Thornton)
Between 1984-1987 TeleNova, a subsidiary of the industrial arm of the Swedish Telecoms system, 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 (Swedish) reference manual is ISBN 91-24-40022-X.
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.
COMAL was available for:
- BBC Micro
- Commodore PET (public domain software)
- Commodore 64 (public domain software)
- Commodore 128
- IBM PC
- Tiki 100
- ZX Spectrum
- Grundy NewBrain
- Windows XP
- "Hello, world!"
PRINT "HELLO, WORLD!"
IF condition THEN instructions ENDIF
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#
- Ryan, Kevin. "COMAL Kernel Syntax & Semantics" (PDF). Dansk Datahistorisk Forening. Retrieved 8 November 2017.
- Bain, Richard; Lindsay, Len. "Common COMAL Definition and Tests". COMAL Today (24): 21–46. Retrieved 20 January 2020.
- "Common COMAL -- Compatible keywords". COMAL Today (25): 28. Retrieved 20 January 2020.
- "Common COMAL -- Keyword syntax and examples". COMAL Today (25): 29–33. Retrieved 20 January 2020.
- Christensen, Børge. "The Story of COMAL". COMAL Today (24): 1–10. Retrieved 4 September 2020.
- Moynihan, Michael D. (8 August 1983). "COMAL coverage out of Ireland". InfoWorld. 5 (32): 30. Retrieved 15 November 2017.
- Brady, Michael P. (May 1986). The Design of a First Course in Programming. Loughborough, Leicester, UK: Loughborough University of Technology. Retrieved 15 November 2017.
- Kelly, John (1984). Foundations in Computer Studies with COMAL (Second ed.). Dublin, Ireland: The Educational Company. Retrieved 20 January 2020.
- Lundy, Thomas; O'Sullivan, Rory (1990). Beginning structured programming in BASIC and COMAL. Dublin, Ireland: Gill and Macmillan. ISBN 978-0717116676.
- Thornton, Roy; Christensen, Paul (1984). COMAL on the BBC Microcomputer and Acorn Electron SBD 19. Acornsoft. ISBN 978-0907876908.
- Thomas Lundy & Rory O'Sullivan: Beginning Structured Programming in BASIC and COMAL, 1990
- Roy Atherton: Structured programming with COMAL. Horwood, Chichester 1982, ISBN 0-85312-416-7.
- Bramer, M. A. (1982). "COMAL 80—Adding structure to BASIC". Computers & Education. 6 (2): 179–192. doi:10.1016/0360-1315(82)90031-8. ISSN 0360-1315.
- Børge R. Christensen: Beginning Comal. Horwood, Chichester 1982, ISBN 0-85312-435-3.
- Børge R. Christensen: COMAL Reference Guide. Toronto PET Users Group, Toronto Ontario, ISBN 0-920607-00-4.
- Leuschner, Burkhard (1987). "Comal's the thing". System. 15 (3): 373–376. doi:10.1016/0346-251X(87)90011-X. ISSN 0346-251X.
- Len Lindsay: COMAL handbook. Reston Publishing, Reston, VA, 1983, ISBN 0-8359-0878-X.
- Gordon Shigley: COMAL Workbook. Comal Users Group, USA, 1985, ISBN 0-928411-05-2.