Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不能让它工作。
set dut xyz set fname [join {$dut "-CE"} ""]
但这有效:
set fname [join {xyz "-CE"} ""]
我希望 fname 为“xyz-CE”
尝试以下
set dut xyz set fname ${dut}-CE
正常的单词连接不需要join.
join
AS glenn 说大括号不支持变量替换,所以用这样的双引号将它分组
set dut xyz set fname [join "$dut -CE" ""]
尝试
set dut xyz eval set fname [join {$dut "-CE"} ""]
它给
xyz-CE