how to combine two strings in TCL? -


i have following code in tcl:

set string1 "do firstthing" set string2 "do secondthing" 

how make combine 2 strings have "do firstthing secondthing"

you can use append this:

% set string1 "do firstthing" % set string2 "do secondthing" % append string1 " " $string2 % puts $string1 firstthing secondthing 

you can put them next other...

% set string1 "do firstthing" % set string2 "do secondthing" % puts "$string1 $string2" firstthing secondthing 

or if strings in list, can use join , specify connector...

% set listofstrings [list "do firstthing" "do secondthing"] % puts [join $listofthings " "] firstthing secondthing 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -