SplitScript reference / Language / while

while

keyword

while condition { ... }

Repeats a block while its condition is true.

The condition must be bool and is evaluated before every iteration. The loop body has its own lexical scope. In onAttach, await and retry resume through explicit loop-header and exit states without replaying completed iterations.

Examples

Repeat while attached

while index < values.length() {
    index += 1
}