Here document: Difference between revisions
Content added Content deleted
(→{{header|Wren}}: Oops, no hyphen.) |
(→{{header|Factor}}: add more multiline examples) |
||
Line 470: | Line 470: | ||
=={{header|Factor}}== |
=={{header|Factor}}== |
||
Factor strings surround by '"' are multiline, but accept escape sequences (like "\n", "\uxxxxxxxx"). Strings surrounded by '"""' don't have to escape '"'. Use HEREDOC: (and other variants) for verbatim text |
Factor strings surround by '"' are multiline, but accept escape sequences (like "\n", "\uxxxxxxxx"). Strings surrounded by '"""' don't have to escape '"'. Use HEREDOC: (and other variants, like <pre>[[</pre>) for verbatim text |
||
<lang factor>" a multiline |
<lang factor>" a multiline |
||
string\n(with escape sequences: \u{greek-capital-letter-sigma}) |
string\n(with escape sequences: \u{greek-capital-letter-sigma}) |
||
" |
" |
||
"""this is "easier"..""" |
"""this is "easier"..""" |
||
HEREDOC: EOF |
HEREDOC: EOF |
||
this |
this |
||
is not \n escaped at all |
is not \n escaped at all |
||
EOF</lang> |
EOF</lang> |
||
[[ this also works , but needs a space at the start (but not the end)]] |
|||
[[this won't work]] |
|||
[=[ this works like [[, but I can write [[ and ]] without restriction]=] |
|||
[==[ it keeps going]==] |
|||
[===[ like this]===] |
|||
[====[ for a while]====] |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |