05-循环ok
Structure
fn · h1main
comment
comment
倒数:
bind
`n` = 3while
`n` > 0call
> 打印 内容=`n`bind
`n` = `n` - 1comment
遍历表(表即集合):
bind
`篮子` = [苹果, 梨]foreach
[水果](篮子)call
> 打印 内容=今天 `水果`Functions
Variables
-
n int00
-
水果 text梨梨
-
篮子 list · 2
# value 1 苹果 2 梨 # value 1 苹果 2 梨
Execution
3
2
1
今天 苹果
今天 梨
Source
--- title: 循环 description: 条件循环与表遍历 --- # main 在函数体里,`-` 表示循环(不是参数)。 倒数: **`n` = 3** - `n` > 0 > 打印 内容=`n` **`n` = `n` - 1** 遍历表(表即集合): `篮子` = | 水果 | |------| | 苹果 | | 梨 | - [水果](篮子) > 打印 内容=今天 `水果`
在函数体里,
-表示循环(不是参数)。