Goto » 历史记录 » 版本 2
yangdefeng, 2023-09-11 17:48
1 | 1 | machenhe | _*%{color:green}goto%*_ |
---|---|---|---|
2 | 2 | yangdefeng | |
3 | 1 | machenhe | 同一脚本文件内@块跳转 |
4 | |||
5 | 2 | yangdefeng | 标签:命令定义|goto>goto |
6 | 1 | machenhe | *格式* |
7 | |命令名 |参数1 | |
||
8 | |goto |跳转标签 | |
||
9 | |||
10 | *说明* |
||
11 | 2 | yangdefeng | * 参数1:跳转标签 |
12 | 1 | machenhe | 以@开头的任意字符串 |
13 | %{color:deepPink}支持<$str()>变量取值% |
||
14 | 2 | yangdefeng | 支持传参 |
15 | 1 | machenhe | |
16 | - |
||
17 | - |
||
18 | |||
19 | 2 | yangdefeng | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
20 | 1 | machenhe | |
21 | bq. [@main] |
||
22 | #if |
||
23 | #act |
||
24 | 2 | yangdefeng | [[sendMsg]] 6 我是@main |
25 | *{color:green}goto* @1 |
||
26 | 1 | machenhe | %{color:lightgrey};--跳至@1% |
27 | [@1] |
||
28 | #if |
||
29 | #act |
||
30 | 2 | yangdefeng | [[sendMsg]] 6 我是@1 |
31 | *{color:green}goto* @2 |
||
32 | 1 | machenhe | %{color:lightgrey};--跳至@2% |
33 | [@2] |
||
34 | #if |
||
35 | #act |
||
36 | 2 | yangdefeng | [[sendMsg]] 6 我是@2 |
37 | 1 | machenhe | |
38 | - |
||
39 | - |
||
40 | |||
41 | bq. %{color:lightgrey};--goto 跳转标签支持变量% |
||
42 | [<notextile>@</notextile>main] |
||
43 | %{color:lightgrey}; |
||
44 | ;--设置跳转标签1的条件% |
||
45 | #if |
||
46 | #act |
||
47 | 2 | yangdefeng | [[mov]] n1 1 |
48 | *{color:green}goto* <notextile>@</notextile><$str(n1)> |
||
49 | 1 | machenhe | %{color:lightgrey}; |
50 | ;--设置跳转标签2的条件% |
||
51 | #if |
||
52 | #act |
||
53 | 2 | yangdefeng | [[mov]] n1 2 |
54 | *{color:green}goto* <notextile>@</notextile><$str(n1)> |
||
55 | 1 | machenhe | %{color:lightgrey}; |
56 | ;--设置跳转标签3的条件% |
||
57 | #if |
||
58 | #act |
||
59 | 2 | yangdefeng | [[mov]] n1 3 |
60 | *{color:green}goto* <notextile>@</notextile><$str(n1)> |
||
61 | 1 | machenhe | %{color:lightgrey}; |
62 | ;标签1执行% |
||
63 | [@1] |
||
64 | #act |
||
65 | 2 | yangdefeng | [[sendMsg]] 6 特戒初次问候 |
66 | 1 | machenhe | %{color:lightgrey}; |
67 | ;标签2执行% |
||
68 | [@2] |
||
69 | #act |
||
70 | 2 | yangdefeng | [[sendMsg]] 6 特戒再次问候 |
71 | 1 | machenhe | %{color:lightgrey}; |
72 | ;标签3执行% |
||
73 | [@3] |
||
74 | #act |
||
75 | 2 | yangdefeng | [[sendMsg]] 6 特戒三次问候 |