COMAL is a high-level programming language developed in Denmark in the early 1980s. It was designed to be easy to learn and use, making it ideal for beginners in programming. In this guide, we will cover the basics of COMAL, including how to write code in it, and what applications it is best suited for.

Getting Started with COMAL
COMAL is a simple programming language with easy-to-understand syntax. It is similar to BASIC in its structure and logic. To write a program in COMAL, you will need a text editor or an Integrated Development Environment (IDE) that supports COMAL. 

COMAL uses line numbers to indicate the order in which statements should be executed. The basic structure of a COMAL program is as follows:

10 REM This is a comment
20 LET x = 10
30 PRINT x
40 END

In this example, the program starts with a comment on line 10. Line 20 defines a variable 'x' and assigns it the value 10 using the LET statement. Line 30 prints the value of 'x' to the console using the PRINT statement. Finally, the program ends on line 40 using the END statement.

Variables in COMAL can be assigned values using the LET statement, and the PRINT statement can be used to output the value of a variable or a string to the console.

Flow Control Statements in COMAL
COMAL provides several flow control statements, including IF-THEN-ELSE, FOR-NEXT, WHILE-WEND, and REPEAT-UNTIL. These statements are used to control the flow of execution within a program.

The IF-THEN-ELSE statement is used to test a condition and execute a block of code if the condition is true. The ELSE clause can be used to execute a different block of code if the condition is false.

The FOR-NEXT statement is used to execute a block of code a specific number of times. It can also be used to iterate over an array or a list of values.

The WHILE-WEND statement is used to execute a block of code while a condition is true. The REPEAT-UNTIL statement is used to execute a block of code at least once, and then repeat the block until a condition is met.

Example Program
Here's an example program that demonstrates the use of some of the basic COMAL statements:

10 REM Example program
20 LET x = 1
30 WHILE x < 11 WEND
40 END

In this program, the WHILE loop on line 30 will execute the block of code between the WHILE and WEND statements while the value of 'x' is less than 11. The program ends on line 40 with the END statement.

Applications of COMAL
COMAL was originally designed for teaching programming to beginners, and it is still used in some schools and universities for this purpose. It is also used in some scientific and engineering applications, as well as in embedded systems and microcontrollers.

Conclusion
COMAL is a simple and easy-to-learn programming language that is ideal for beginners in programming. It is similar to BASIC in its structure and logic, and it provides several flow control statements that allow for more complex programs. Although it is not as widely used as some other programming languages, it still has applications in education, scientific research, and embedded systems.