LoopGoto » 历史记录 » 版本 1
tejie, 2024-07-02 15:18
1 | 1 | tejie | h4. _*{color:green}loopGoto*_ |
---|---|---|---|
2 | |||
3 | 对指定模块循环执行指定次数,达到条件可退出循环 |
||
4 | |||
5 | 标签:命令定义|loopGoto>loopGoto |
||
6 | |||
7 | *格式* |
||
8 | |命令名 |参数1 |参数2 | |
||
9 | |loopGoto |跳转标记 |循环次数 | |
||
10 | |||
11 | 循环次数为空或0时,会执行一次。 |
||
12 | |||
13 | - |
||
14 | - |
||
15 | |||
16 | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
||
17 | |||
18 | bq. [<notextile>@</notextile>main] |
||
19 | #act |
||
20 | [[mov]] n1 0 |
||
21 | [[mov]] n2 1 |
||
22 | *{color:green}loopGoto* @运算 100 |
||
23 | [[print]] 1加到100的结果为:<notextile><$str(n1)></notextile> |
||
24 | <notextile></notextile> |
||
25 | [<notextile>@</notextile>运算] |
||
26 | #act |
||
27 | [[inc]] n1 n2 |
||
28 | [[inc]] n2 1 |