while
loop works exactly like its counterpart in C# or C++, and repeat-until
is analogous to do-while
in those languages (or simply repeat-until
in Pascal) with one exception. It always annoyed me that the latter loop does not create full scope, so I have to write such dreadful code as this:
{ var loop_cond = false; do { loop_cond = ... } while (loop_cond); }
The extra scope prevents leaking of control variable. In Skila repeat-until
creates scope that ends after loop, so you can introduce variable inside loop and still use it in loop condition:
repeat var loop_cond = false; loop_cond = ... until not loop_cond;
Note the lack of parentheses around loop condition. I have customized my keyboard layout but still typing no character is faster than typing single one.