LocalazyLocalazy
COMAL is a structured, imperative programming language with syntax based on Pascal and BASIC. It was designed in the late 1970s by Børge Christensen and Ole-Johan Dahl as a teaching language, and was subsequently used as the basis for several educational programming languages. The name COMAL derives from "Copenhagen Municipal Automatic Language". The syntax of COMAL is based on that of Pascal, with some elements borrowed from BASIC. It is a structured, imperative language with support for subroutines, functions, and global and local variables. COMAL programs are typically organized into a main program and a number of subroutines. The main program consists of a sequence of commands, while each subroutine consists of a sequence of commands enclosed in a subroutine declaration. Variables in COMAL are either global or local. Global variables are visible to all subroutines, while local variables are only visible to the subroutine in which they are declared. Functions and subroutines can be written in COMAL, and can be called from within a COMAL program. Functions can return a value, while subroutines cannot. COMAL also supports input/output, including file input/output and screen input/output. COMAL was designed as a teaching language, and was used as the basis for several educational programming languages. The first version of COMAL was released in 1978. COMAL has been used as a teaching language in a number of countries, including Denmark, Norway, Sweden, Iceland, and the United States.