String interpolation (included): Difference between revisions

(Adds slope example)
Line 2,000:
set fun3 {aNd]}
puts [subst "$grandpa $fun1$[subst $$fun2] $fun3 $grandma"]</syntaxhighlight>
 
=={{header|Transd}}==
<syntaxhighlight lang="Scheme">#lang transd
 
MainModule: {
size: "little",
 
_start: (λ
// Transd supports direct interpolation
(with s String("Mary had a " size " lamb.")
(lout s))
 
// To interpolate a string variable within another
// string variable we use 'replace'
(with s "Mary had a %s lamb."
(lout (replace s "%s" size)))
)
}</syntaxhighlight>
{{out}}
<pre>
Mary had a little lamb.
Mary had a little lamb.
</pre>
 
=={{header|TUSCRIPT}}==
111

edits