String append: Difference between revisions
Content added Content deleted
(→Tcl: Added implementation) |
|||
Line 28: | Line 28: | ||
123456789! |
123456789! |
||
</pre> |
</pre> |
||
=={{header|Tcl}}== |
|||
String concatenation is a fundamental feature of the Tcl language, and there is also an <code>append</code> that makes concatenation even simpler: |
|||
<lang tcl>set s "he" |
|||
set s "${s}llo wo"; # The braces distinguish varname from text to concatenate |
|||
append s "rld" |
|||
puts $s</lang> |
|||
{{out}}<pre>hello world</pre> |
|||
=={{header|Wart}}== |
=={{header|Wart}}== |