项目

一般

简介

<$str()> » 历史记录 » 版本 3

yangdefeng, 2023-07-05 10:49

1 2 yangdefeng
h4. _*%{color:green}<$str()>%*_
2 1 machenhe
将指定变量的值转换为字符串,用于文本输出
3
支持多层嵌套
4 3 yangdefeng
%{color:deepPink}会进行变量的递归解析%
5 1 machenhe
6
标签:命令定义|<$str()>
7 3 yangdefeng
标签:命令定义><$str()>
8 1 machenhe
9
*格式*
10
<$str(变量名)>
11
12
-
13
-
14
15 2 yangdefeng
h4. *%{color:deepskyblue}特戒引擎脚本示例:%*
16 1 machenhe
17
bq. [@main]
18
#if
19
#act
20 3 yangdefeng
mov s0 你好特戒
21
sendMsg 6 <$str(s0)>
22 1 machenhe
23
-
24
-
25
26
bq. %{color:lightGrey};--$str嵌套示例%
27
[@main]
28
#if
29
#act
30 3 yangdefeng
mov s$任务1描述 任务1描述
31
mov s$任务2描述 任务2描述
32
mov s$任务3描述 任务3描述
33
mov s$任务4描述 任务4描述
34
mov s$任务5描述 任务5描述
35 1 machenhe
%{color:lightGrey};%
36 3 yangdefeng
mov n$任务id 1
37
sendMsg 6 <$str(s$任务<$str(n$任务id)>描述)>
38 1 machenhe
%{color:lightGrey};%
39 3 yangdefeng
mov n$任务id 2
40
sendMsg 6 <$str(s$任务<$str(n$任务id)>描述)>
41 1 machenhe
%{color:lightGrey};%
42 3 yangdefeng
mov n$任务id 3
43
sendMsg 6 <$str(s$任务<$str(n$任务id)>描述)>
44 1 machenhe
%{color:lightGrey};%
45 3 yangdefeng
mov n$任务id 4
46
sendMsg 6 <$str(s$任务<$str(n$任务id)>描述)>
47 1 machenhe
%{color:lightGrey};%
48 3 yangdefeng
mov n$任务id 5
49
sendMsg 6 <$str(s$任务<$str(n$任务id)>描述)>
50
51
-
52
-
53
54
h4. *{color:red}注意<$str()>会进行变量的递归解析*
55
56
*%{color:deepskyblue}特戒引擎脚本示例:%*
57
58
bq. [@main]
59
#act
60
[[mov]] a2 helloworld
61
[[mov]] a1 a2
62
&nbsp;
63
%{color:lightGrey};以下输入-->helloworld%
64
[[print]] <$str(a1)>
65
&nbsp;
66
%{color:lightGrey};以下输入-->a2%
67
[[print]] <$str2(a1)>