Anonymous user
String prepend: Difference between revisions
→{{header|Forth}}
Line 283:
=={{header|Forth}}==
Forth has no string prepend word, but adding it is not difficult. This demonstration
<lang>\ the following functions are commonly native to a Forth system. Shown for completeness
Line 296:
\ Example begins here
256 buffer: string1 \ buffer: is Forth 2012 word▼
s" needs no introducton!" STRING1 PLACE \ initialize our string▼
: PREPEND ( addr len addr2 -- addr2)
>R \ push addr2 to return stack
Line 310 ⟶ 306:
Test our language extensions interactively at the console
string1 writeln
needs no introduction! ok
|