Sujet : Re: Back & Forth - Co-routines
De : melahi_ahmed (at) *nospam* yahoo.fr (ahmed)
Groupes : comp.lang.forthDate : 31. Jan 2025, 17:30:35
Autres entêtes
Organisation : novaBBS
Message-ID : <92db5c3ac1b10a4ae56c1fe5c558b72b@www.novabbs.com>
References : 1 2 3
User-Agent : Rocksolid Light
On Fri, 31 Jan 2025 14:55:05 +0000, Hans Bezemer wrote:
First the preliminaries:
>
: ;then postpone exit postpone then ; immediate
: >zero dup xor ;
: spin swap rot ;
>
These are 4tH-ese, but I'm attached to them. ;-)
( n1 n2 n3 n4 -- n5)
: calc - >r - 100 r> spin */ ;
>
: tri_mf4
>r rot r> swap >r spin ( c b a R: x )
dup r@ >= if drop drop >zero rdrop ;then
over r@ >= over r@ < and if dup r> swap calc ;then drop
over r@ >= over r@ < and if over r> calc ;then
rdrop drop >zero
;
>
I studied this version you've prposed: tri_mf4.
I find it amazing, comprehensible (redibility) and very clever (compared
to mine tri_mf1 in the previous post).
Thanks a lot for it.
Hans Bezemer
Ahmed
--