Here document: Difference between revisions
Content added Content deleted
(add BQN) |
(GNU APL heredoc and multi-line string syntax example) |
||
Line 106: | Line 106: | ||
I've one thing to say and that's ... |
I've one thing to say and that's ... |
||
Dammit. Janet, I love you.</pre> |
Dammit. Janet, I love you.</pre> |
||
=={{header|APL}}== |
|||
{{works with|GNU APL}} |
|||
See the GNU APL docs: [https://www.gnu.org/software/apl/apl.html#Section-2_002e1 2.1.4 Helpful Features for Scripting] |
|||
<lang apl> |
|||
BODY←⎕INP 'END-OF-⎕INP' |
|||
First line |
|||
Second line |
|||
Third line |
|||
... |
|||
END-OF-⎕INP |
|||
</lang> |
|||
A related concept is multi-line strings (note the 6 space indent of APL interactive input vs. output): |
|||
<lang apl> |
|||
]boxing 8 |
|||
""" |
|||
→ abc |
|||
→ def |
|||
→ |
|||
→ GHIJK |
|||
→ """ |
|||
</lang> |
|||
{{out}} |
|||
<pre>┌→───────────────────────────────────────┐ |
|||
│┌→────┐ ┌→───────┐ ┌→───┐ ┌→───────────┐│ |
|||
││ abc│ │ def│ │ │ │ GHIJK││ |
|||
│└─────┘ └────────┘ └────┘ └────────────┘│ |
|||
└∊───────────────────────────────────────┘</pre> |
|||
=={{header|ARM Assembly}}== |
=={{header|ARM Assembly}}== |