Here document: Difference between revisions

Added Wren
(Added Wren)
Line 2,155:
WshShell.Popup "created " & strFileNameOUT, 3, "Completed", 64
</lang>
 
=={{header|Wren}}==
Wren has neither here-docs nor raw strings.
 
Embedding escape characters in ordinary strings is not too bad in practice as the language doesn't use single quotes or back-ticks at all so these don't need to be escaped. A reasonable workaround is therefore to use a list of strings (one per line) and then join them together with the '\n' newline character.
 
However, if there's a lot of text, it's probably best to just load it in from a file.
 
Borrowing the Ada example (appropriately adjusted) for an illustration of the former approach:
<lang ecmascript>var a = [
"This is a list of 'strings' with the following properties:",
" - indention is preserved, and",
" - a quotation mark '\"' must be \"escaped\" by preceding it with a '\\'.",
"`Have fun!`"
]
System.print(a.join("\n"))</lang>
 
{{out}}
<pre>
This is a list of 'strings' with the following properties:
- indention is preserved, and
- a quotation mark '"' must be "escaped" by preceding it with a '\'.
`Have fun!`
</pre>
 
=={{header|XPL0}}==
9,479

edits