zug
also written: while
Loops
Keep doing something while a check stays gronk.
How to write it
zug <check>
<things to do>
unga
What it does
zug checks before every lap. If the check is gronk, it does the things inside and checks again.
When the check becomes nork, the loop stops.
Example
grunk fuel = 3
zug fuel > 0
oga "Zoom! fuel left:", fuel
fuel = fuel - 1
unga
oga "Out of fuel."
Tips
- If the check never becomes nork you get the 'ran for a very long time' error.
- Change a box inside the loop so the check can finish.