String interpolation (included): Difference between revisions
m
→{{header|APL}}
m (→{{header|APL}}) |
m (→{{header|APL}}) |
||
Line 628:
=={{header|APL}}==
<lang apl>
s ← 'Mary had a
s
Mary had a little lamb
Line 637:
∇r ← s sInterp sv
⍝⍝ Interpolate items in sv into s (string field substitution)
⍝ s: string - format string, '
⍝ sv: vector - vector of items to interpolate into s
⍝ r: interpolated string
s[('
r ← ∊s
∇
'Mary had a
Mary had a little lamb, its fleece was black as night.
'Mary had a
Mary had a little lamb, its fleece was large as 42.
</lang>
|