String append: Difference between revisions

Content deleted Content added
Line 181: Line 181:
x <- x + "bar"
x <- x + "bar"
printfn "%s" x</lang>
printfn "%s" x</lang>


=={{header|Forth}}==
<lang Forth>Strings in Forth are simply named memory locations

create astring 256 allot \ create a "string"

s" Hello" astring PLACE \ initialize the string

s" World!" astring +PLACE \ append with "+place"

</lang>

Test at the console

<lang>astring count type Hello World! ok
</lang>


=={{header|Go}}==
=={{header|Go}}==