项目

一般

简介

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

tejie, 2025-09-26 17:20

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