打印文本,因为它在tcl中

时间:2014-08-13 14:06:01

标签: text tcl

就像在python中一样,我可以简单地将整个文本放在"""中,它将在您在"""

中写入时存储
outText = """ some text that doesn't contain "\n" and 
          everything can be outputted with 1 print command """
print outText

是否可以将整个文本保留在某种括号内并打印出文本,而不是puts逐行 - 或在行的每一行使用\n

1 个答案:

答案 0 :(得分:4)

使用大括号:

set outText {some text that doesn't contain "\n" and
everything can be outputted with 1 put command}
puts $outText