Triple quoted strings in Boo are used to preserve spacing and linebreaks without a thick slathering of \n's all over your precious code.
It is good for visually representing XML, for instance:
xml = """
<xml>
<randomElement>
</randomElement>
</xml>
"""
It is also most excellent for formatting console output:
name = prompt("Name: ") age = prompt("Age: ") sex = prompt("Sex: ") print """ Hello, ${name}! My name is Hal, and I will be your Operating System today. My sensors indicate that you are a ${age} year old ${sex} If you need any assistance navigating this user interface, please ask. ... Humans are so fragile... """
Labels
(None)

Comments (1)
Feb 17
FrozenCow says:
It should be noted that stringescaping will not work within triplequotes, like t...It should be noted that string-escaping will not work within triple-quotes, like this page does: http://boo.codehaus.org/Part+02+-+Variables#Part02-Variables-CharactersandStrings