# while: repeating while a condition is true [Syntax and values](README.md) ```text let count = 3 while count > 0: say count set count = count - 1 ``` The condition is evaluated before each iteration and must be `Boolean`. Each iteration body has a fresh child scope. Use `set` on an outer variable to retain changes between iterations. There is no `break` or `continue` statement. Structure the condition or use a function return when appropriate. Long-running cooperative loops should call a positive `wait` so they remain responsive and receive a fresh instruction budget slice. ## Example ```pliro # language: en let count = 3 while count > 0: say count set count = count - 1 ``` ## Related entries [Syntax and values](README.md) · [Built-ins](../builtins/README.md) · [Programming guides](../guides/README.md)