Deutsch   English   Français   Italiano  
<c9b33456f1e26c3118cc6af22d5d5df0d243da4e@i2pn2.org>

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

Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: dxf <dxforth@gmail.com>
Newsgroups: comp.lang.forth
Subject: Re: Back & Forth - Co-routines
Date: Sat, 22 Mar 2025 10:26:45 +1100
Organization: i2pn2 (i2pn.org)
Message-ID: <c9b33456f1e26c3118cc6af22d5d5df0d243da4e@i2pn2.org>
References: <nnd$2fb29a8e$298ef3f8@23fe4f00fa62d734>
 <49736c0ec0e34ca5d67f4e0d6e8cbe2a080e38ab@i2pn2.org>
 <2ec5cfbd438db9be750543c9ebddfa6ffa17583c@i2pn2.org>
 <nnd$1f42dd83$46acbe92@989dd2363be1c9eb>
 <00c65eb0d61675581c8e5bd83d47295e47b23eb4@i2pn2.org>
 <d2b319f243d4ae87854f61b9df5204311354f54b@i2pn2.org>
 <nnd$5146c412$48868a82@743c2e4b64590bac>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 21 Mar 2025 23:26:45 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="1195358"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc";
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
X-Spam-Checker-Version: SpamAssassin 4.0.0
In-Reply-To: <nnd$5146c412$48868a82@743c2e4b64590bac>
Bytes: 1855
Lines: 22

On 21/03/2025 11:27 pm, Hans Bezemer wrote:
> ... 
> Nice test - I bet it wouldn't be too hard to implement at least part of the Forth-200x implementation ;-)
> 
> Sometin' like define {:
> 1. Parse a word;
> 2. If not :} then create a (local);
> 3. Repeat.
> 
> Ok, this is horrible code, it needs the VALUES in reverse, but it works:
> 
> : :} ;
> : {: begin ' dup ['] :} <> while >body postpone literal postpone (local) repeat drop ; immediate
> 
> : test {: b a :} a b / ;

I'd just call that LOCAL| and be done.  Can't say I ever found the syntax an
annoyance.  I appreciate it might not be ideal for doing Windows API calls...