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, 05:55:54
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <03d13185898a1ee00bea4f420aa1a3721b0585f2@i2pn2.org>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla Thunderbird
On 27/04/2025 8:28 pm, Hans Bezemer wrote:
...
Another handy word is >STRING that converts a "raw" string to a fully qualified string ( a1 n1 -- a2) that can handle a COUNT (you have the carnal knowledge - you take care of the "how"). E.g. for counted strings it might be:
: >STRING swap over over dup char+ rot cmove c! ;
For forths that have PACK ( a u a2 -- a2 )
: >STRING ( a u -- a ) over pack ;