Inc » 历史记录 » 版本 2
yangdefeng, 2022-05-25 07:57
1 | 2 | yangdefeng | h4. _*%{color:green}inc%*_ |
---|---|---|---|
2 | |||
3 | 1 | machenhe | 数字或字符串变量累加 |
4 | |||
5 | 标签:命令定义 |
||
6 | |||
7 | *格式* |
||
8 | |命令名 |参数1 |参数2 | |
||
9 | |inc |变量 |变量(或数值) | |
||
10 | |||
11 | *说明* |
||
12 | 2 | yangdefeng | * 参数1: 待被累加的变量 |
13 | 累加结果会存入该变量 |
||
14 | 1 | machenhe | |
15 | 2 | yangdefeng | * 参数2: 用来累加的变量(或数值) |
16 | 1 | machenhe | |
17 | * 关于参数1和参数2的数据类型,及处理结果 |
||
18 | |=. *参数1类型* |=. *参数2类型* |=. *处理结果* | |
||
19 | |参数1为整数 |参数2为整数 |参数1数值加上参数2数值,返回给参数1 | |
||
20 | |参数1为字符串 |参数2为整数 |参数2作为字符串,接在参数1结尾,返回给参数1 | |
||
21 | |参数1为字符串 |参数2为字符串 |参数2作为字符串,接在参数1结尾,返回给参数1 | |
||
22 | |参数1为整数 |参数2为字符串 |不支持,类型不匹配 | |
||
23 | |||
24 | - |
||
25 | - |
||
26 | |||
27 | *%{color:deepskyblue}脚本示例:%* |
||
28 | |||
29 | bq. [@main] |
||
30 | #if |
||
31 | #act |
||
32 | 2 | yangdefeng | [[mov]] [[基础变量|n10]] 1 |
33 | [[mov]] [[基础变量|n14]] 1 |
||
34 | *{color:green}inc* [[基础变量|n10]] [[基础变量|n14]] |
||
35 | [[sendMsg]] 6 1号测试[[<$str()>|<$str(n10)>]] |
||
36 | 1 | machenhe | %{color:lightgrey};------------------------------------------% |
37 | 2 | yangdefeng | [[mov]] [[基础变量|n10]] 1 |
38 | [[mov]] [[基础变量|n14]] 1 |
||
39 | *{color:green}inc* [[基础变量|n10]] [[<$str()>|<$str(n14)>]] |
||
40 | [[sendMsg]] 6 2号测试[[<$str()>|<$str(n10)>]] |
||
41 | 1 | machenhe | %{color:lightgrey};------------------------------------------% |
42 | 2 | yangdefeng | [[mov]] [[基础变量|s10]] a |
43 | [[mov]] [[基础变量|s14]] b |
||
44 | *{color:green}inc* [[基础变量|s10]] [[<$str()>|<$str(s14)>]] |
||
45 | [[sendMsg]] 6 3号测试<$str(s10)> |
||
46 | 1 | machenhe | %{color:lightgrey};------------------------------------------% |
47 | 2 | yangdefeng | [[mov]] [[基础变量|s10]] a |
48 | [[mov]] [[基础变量|s14]] b |
||
49 | *{color:green}inc* [[基础变量|s10]] [[基础变量|s14]] |
||
50 | [[sendMsg]] 6 4号测试[[<$str()>|<$str(s10)>]] |