How to concisely concatenate strings in Tcl?

前端 未结 3 1644
面向向阳花
面向向阳花 2021-02-05 06:00

I can easily concatenate two variables, foo and bar, as follows in Tcl: \"${foo}${bar}\".

However, if I don\'t want to put an intermediate result into a variable, how ca

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-05 06:47

    just write it as a word with no extra spaces:

    [myFoo $arg][myBar $arg]
    

    Tcl sees this as a single word after substitution, regardless of the result of the two subcommands.

提交回复
热议问题