Re: Back & Forth - Co-routines

Liste des GroupesRevenir à cl forth 
Sujet : Re: Back & Forth - Co-routines
De : melahi_ahmed (at) *nospam* yahoo.fr (ahmed)
Groupes : comp.lang.forth
Date : 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
--

Date Sujet#  Auteur
31 Jan 25 * Re: Back & Forth - Co-routines12ahmed
31 Jan 25 +* Re: Back & Forth - Co-routines2ahmed
31 Jan 25 i`- Re: Back & Forth - Co-routines1ahmed
31 Jan 25 +- Re: Back & Forth - Co-routines1ahmed
31 Jan 25 +- Re: Back & Forth - Co-routines1ahmed
31 Jan 25 +* Re: Back & Forth - Co-routines6Paul Rubin
1 Feb 25 i+* Re: Back & Forth - Co-routines2ahmed
1 Feb 25 ii`- Re: Back & Forth - Co-routines1ahmed
1 Feb 25 i`* Re: Back & Forth - Co-routines3Anton Ertl
1 Feb 25 i `* Re: Back & Forth - Co-routines2ahmed
1 Feb 25 i  `- SELECT (was: Back & Forth - Co-routines)1Anton Ertl
1 Feb 25 `- Re: Back & Forth - Co-routines1mhx

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal