language · language ·

While loops

while repeats a block while its bool condition remains true.

cpulanguageloopswhileyeho

Use while when the stopping condition is more natural than a known collection or numeric range.

while condition { ... }

Status: stable

Complete while loops example

Use while when the stopping condition is more natural than a known collection or numeric range.

cpu · language · type checked

int health = 30
while health > 0
{
    Console.Log(Text.From(health))
    health = health - 10
}
project.mech
manifestVersion = "2"
package = "api.example.language__while_loop"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"
Notes and source

The condition must be bool.

Update the condition's inputs inside the loop unless an external event owns progress.

yeho/parser_statements.cpp parseWhileStatement; Kyber loop runtime fixtures