PYPL
PYPL

Reputation: 1859

printing text as it is in tcl

like in python i can simply take the whole text in """ and it will be stored as you wrote it inside the """'s

outText = """ some text that doesn't contain "\n" and 
          everything can be outputted with 1 print command """
print outText

Is it possible to hold the whole text inside some kind of brackets and print out the text without puts-ing every single line one by one or using \n in every end of line?

Upvotes: 2

Views: 241

Answers (1)

Johannes Kuhn
Johannes Kuhn

Reputation: 15172

Use braces:

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

Upvotes: 4

Related Questions