While

From Mesham
Revision as of 15:44, 15 April 2019 by Polas (talk | contribs) (4 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Syntax

while (condition) whilebody;

Semantics

Will loop whilst the condition holds.

Examples

function void main() {
   var a:=10;
   while (a > 0) {
      a--;
   };
};

Will loop, each time decreasing the value of variable a by 1 until the value is too small (0).

Since: Version 0.41b