TCL : Concatenate a variable and a string

前端 未结 7 1555
有刺的猬
有刺的猬 2021-01-01 12:43

Assume we have a variable \'a\' set to 12345 :

set a 12345

Now how do i set a new variable \'b\' which contains the value of \'a\' and anot

相关标签:
7条回答
  • 2021-01-01 13:34

    You can do:

    set b ${a}9876
    

    or, assuming b is either set to the empty string or not defined:

    append b $a 9876
    

    The call to append is more efficient when $a is long (see append doc).

    0 讨论(0)
提交回复
热议问题