Next: , Previous: Decisions, Up: Syntax


3.1.7 Loops

Kite has two types of loops: while and until. while loops execute code while the condition evaluates to true, while until loops execute code until the condition evaluates to true:

     i = 0;
     while (i < 10) [
         i = i + 1;
     ];
     until (i == 0) [
         i = i - 1;
     ];