红色或 Rebol:如何将 "test/a" 转换为 [test/a]
Red or Rebol: how to convert "test/a" to [test/a]
我试过这样做:
b: []
append b to-word "test/a"
但它产生错误
* Syntax Error: invalid character in: "test/a"
* Where: to
*** Stack: run to-word
;30个字符
封杀! "test/a"
>> append b: copy [] to path! "test/a"
== [test/a]
您可以使用 lit-path!
,但默认情况下路径将被拆分:
>> append [] 'test/a
== [test a]
除非您使用 /only
细化:
>> append/only [] 'test/a
== [test/a]
假设是红色。我不确定它在 Rebol 中是否相同。
我试过这样做:
b: []
append b to-word "test/a"
但它产生错误
* Syntax Error: invalid character in: "test/a" * Where: to *** Stack: run to-word
;30个字符
封杀! "test/a"
>> append b: copy [] to path! "test/a"
== [test/a]
您可以使用 lit-path!
,但默认情况下路径将被拆分:
>> append [] 'test/a
== [test a]
除非您使用 /only
细化:
>> append/only [] 'test/a
== [test/a]
假设是红色。我不确定它在 Rebol 中是否相同。