Repeat statements as long as a condition is fulfilled


    Integer i;
    i := 1;
    while i < 10 loop
      i := i + 1;
    end while;


  while expression loop
    { algorithm ";" }
  end while


The expression of a while clause shall be a scalar Boolean expression. The while-clause corresponds to while-statements in programming languages, and is formally defined as follows

  1. The expression of the while clause is evaluated.
  2. If the expression of the while-clause is false, the execution continues after the while-clause.
  3. If the expression of the while-clause is true, the entire body of the while clause is executed (except if a break statement or return statement is executed), and then execution proceeds at step 1.

Generated at 2019-10-23T01:39:47Z by OpenModelicaOpenModelica 1.14.0~dev-26789-g1c369fe using GenerateDoc.mos