Deutsch   English   Français   Italiano  
<nnd$0eef010f$63de6704@e94bfdf344299b9a>

View for Bookmarking (what is this?)
Look up another Usenet article

Newsgroups: comp.lang.forth
References: <nnd$2fb29a8e$298ef3f8@23fe4f00fa62d734> <49736c0ec0e34ca5d67f4e0d6e8cbe2a080e38ab@i2pn2.org>
From: albert@spenarnc.xs4all.nl
Subject: Re: Back & Forth - Co-routines
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$0eef010f$63de6704@e94bfdf344299b9a>
Organization: KPN B.V.
Date: Fri, 31 Jan 2025 11:47:34 +0100
Path: ...!weretis.net!feeder8.news.weretis.net!news.szaf.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feed.abavia.com!abe007.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 40
Injection-Date: Fri, 31 Jan 2025 11:47:34 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
Bytes: 1898

In article <49736c0ec0e34ca5d67f4e0d6e8cbe2a080e38ab@i2pn2.org>,
dxf  <dxforth@gmail.com> wrote:
>On 31/01/2025 4:42 am, Hans Bezemer wrote:
>> The lot of you have contributed to this episode - by discussing the previous episode on local variables.
>>
>> I thank you for your comments - and decided it was worth its own episode: https://youtu.be/FH4tWf9vPrA
>>
>> More than worth! ;-)
>
>Thanks Hans!
>
>Not sure if previously mentioned but here's another version of LOCAL
>
>: ;:  >r ;
>
>: LOCAL ( x adr -- )
>  r> -rot dup @ over 2>r ! ;: 2r> ! ;
>
>variable A  variable B  8 a !  7 b !
>
>: divide ( a b -- )  b local  a local
>  a @  b @  /  . cr  ;
>
>15 3 divide  a ? b ?

I hate TUCK but this code could benefit from RTUCK

: RTUCK R> >R >R ;
Obviously this must be low level.

Groetjes Albert
>
>
>
-- 
Temu exploits Christians: (Disclaimer, only 10 apostles)
Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
And Gifts For Friends Family And Colleagues.