Mov » 历史记录 » 版本 2
yangdefeng, 2022-05-25 07:45
1 | 2 | yangdefeng | h4. _*%{color:green}mov%*_ |
---|---|---|---|
2 | |||
3 | 1 | machenhe | 给[[基础变量]]或者[[基础变量#扩展变量|扩展变量]]赋值 |
4 | |||
5 | 标签:命令定义 |
||
6 | |||
7 | *格式* |
||
8 | |_.命令名 |_.参数1 |_.参数2 | |
||
9 | |mov |变量名 |赋给变量的值 | |
||
10 | |||
11 | *说明* |
||
12 | 2 | yangdefeng | * 参数1: 要赋值的[[基础变量#基础变量]]或者[[基础变量#扩展变量|扩展变量]] |
13 | 1 | machenhe | |
14 | 2 | yangdefeng | * 参数2: 赋给变量的值 |
15 | 1 | machenhe | %{color:deepPink}值的类型需要与变量的类型一致% |
16 | 举例 |
||
17 | n型变量只能接受整数赋值,不能接受字符串赋值 |
||
18 | |||
19 | - |
||
20 | - |
||
21 | |||
22 | 2 | yangdefeng | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
23 | 1 | machenhe | |
24 | bq. [@main] |
||
25 | #act |
||
26 | 2 | yangdefeng | %{color:lightGrey};--s型基础变量赋值% |
27 | *{color:green}mov* [[基础变量|s1]] 你好tejie |
||
28 | [[sendMsg]] 6 基础变量s1的值:<$str(s1)> |
||
29 | %{color:lightGrey};--n型基础变量赋值% |
||
30 | *{color:green}mov* [[基础变量|n1]] 9527 |
||
31 | [[sendMsg]] 6 基础变量n1的值:<$str(n1)> |
||
32 | %{color:lightGrey};--s型扩展变量赋值% |
||
33 | *{color:green}mov* [[基础变量|s$我的字符串]] 欢迎使用特戒引擎 |
||
34 | [[sendMsg]] 6 扩展变量【s$我的字符串】的值:<$str(s$我的字符串)> |
||
35 | %{color:lightGrey};--n型扩展变量赋值% |
||
36 | *{color:green}mov* [[基础变量|n$我的数字变量]] 1024 |
||
37 | [[sendMsg]] 6 扩展变量【n$我的数字变量】的值:<$str(n$我的数字变量)> |