Sujet : Re: "The Best Programming Language for the End of the World"
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 28. Apr 2025, 10:22:40
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <ea2ba1551b51fa08184eef0b52cf7be46b7589a9@i2pn2.org>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla Thunderbird
On 27/04/2025 8:28 pm, Hans Bezemer wrote:
...
Just a shame the very basics are missing. The only thing holding Forth back is the refusal to abstract strings. Wanna make it a counted string with a cell count? Do it. Wanna keep on doing counted strings? Do it. Wanna do ASCIIZ strings? No problem.
But aren't string primitives a la ANS-Forth the key to flexibility? I've used
the concatenation primitive +STRING ( a u a2 u2 -- a2 u+u2 ) countless times.
: ZPLACE ( c-addr u c-addr2 -- ) zcount +string + 0 swap c! ;
: ZAPPEND ( c-addr u c-addr2 -- ) zcount + zplace ;