如何在TCL中打印某些操作的串联

说有这样的代码:
set val "Hello"
set listA {}

lappend listA 6 7
现在我想提出以下内容:
puts "${val} user! Your list contains two values. First is [lindex $listA 0] and the second is [lindex $listA 1]"
我怎么能这样做?     
已邀请:
我不完全确定我是否理解正确。但你做了什么应该工作,只需要一个小小的修改:
set val "Hello"
set listA {6 7}
# or:
# set listA {}
# lappend listA 6 7
puts "${val} user! Your list contains two values. First is [lindex $listA 0] and the second is [lindex $listA 1]"
给出输出:
Hello user! Your list contains two values. First is 6 and the second is 7
    
好的,我找到了答案。问题在于,在我的实际代码中,我使用“[”和“]”符号作为字符串,但没有“”。 所以我需要写:
puts "Zone No ${key} has Range[ [lindex $value 0] - [lindex $value 1] ]"
对不起,这个问题。     

要回复问题请先登录注册