Initializing help system before first use

Flow control constructs

Flow control constructs are mechanisms for controlling the order of the execution of the actions in a program. In this chapter we are going to have a closer look at two fundamental types of control constructs in Mosel: selections and loops.

Frequently actions in a program need to be repeated a certain number of times, for instance for all possible values of some index or depending on whether a condition is fulfilled or not. This is the purpose of loops. Since in practical applications loops are often interwoven with conditions (selection statements), these are introduced first.