Date: Thu, 9 Jan 2025 17:15:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: "Back & Forth" - Local variables Newsgroups: comp.lang.forth References: <752c8e210166d00119336309dc35240d36d6f17d@i2pn2.org> <9747ef2be5ee93d6a4f0c89352a38cec72624609@i2pn2.org> <6a2d3e50f9435ebced9e72d5770af8ff75b6153e@i2pn2.org> Content-Language: en-US From: Hans Bezemer In-Reply-To: <6a2d3e50f9435ebced9e72d5770af8ff75b6153e@i2pn2.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Organization: KPN B.V. Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!2.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!feed.abavia.com!abe004.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail Lines: 31 Injection-Date: Thu, 09 Jan 2025 17:15:24 +0100 Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com" Bytes: 2211 On 09-01-2025 13:42, dxf wrote: >> There is no guarantee that a saved interpreter pointer on the >> stack is an execution token. Nope - in ANS-Forth it is listed as: nest-sys; definition calls; implementation dependent So - that's obvious. But in 4tH it works out. And defining it as >R works out as well. BTW, I've tested the thing - and it holds up. I got my work cut out for a next episode! On co-routines! ;-) Hans Bezemer BTW, I've heard there are implementations where nest-sys aren't even on the return stack. The standard seems to confirm this: return stack: A stack that _MAY_BE_ used for program execution nesting, do-loop execution, temporary storage, and other purposes. ... and sorry to spoil the fun, but what we're doing here is illegal anyways: "A program shall _NOT_ access values on the return stack (using R@, R>, 2R@ or 2R>) that it _DID_NOT_ place there using >R or 2>R;" In other words: your mileage may (be) very, very illegal. Hans Bezemer