05-loopok
Structure
fn · h1main
comment
comment
Countdown:
bind
`n` = 3while
`n` > 0call
> print text=`n`bind
`n` = `n` - 1comment
Walk a table (tables are collections):
bind
`basket` = [apple, pear]foreach
[fruit](basket)call
> print text=today `fruit`Functions
Variables
-
basket list · 2
# value 1 apple 2 pear # value 1 apple 2 pear -
fruit textpearpear
-
n int00
Execution
3
2
1
today apple
today pear
Source
--- title: Loops description: Condition loops and table walks --- # main Inside a function body, `-` starts a loop (not a parameter). Countdown: **`n` = 3** - `n` > 0 > print text=`n` **`n` = `n` - 1** Walk a table (tables are collections): `basket` = | fruit | |-------| | apple | | pear | - [fruit](basket) > print text=today `fruit`
Inside a function body,
-starts a loop (not a parameter).