Sujet : Re: "Back & Forth" - Local variables
De : albert (at) *nospam* spenarnc.xs4all.nl
Groupes : comp.lang.forthDate : 12. Mar 2025, 13:51:42
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$4cadeee9$421a387f@e2d00958c394caf2>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
nnd$3977f8e0$309bbbfa@b7c8c77c999f35b5>,
Hans Bezemer <
the.beez.speaks@gmail.com> wrote:
On 12-03-2025 11:29, albert@spenarnc.xs4all.nl wrote:
In article <858080e0b3faa16a4b9ba24e3b34e12a555494b4@i2pn2.org>,
dxf <dxforth@gmail.com> wrote:
On 12/03/2025 8:14 am, Hans Bezemer wrote:
...
>
This discussion is typical of Forth. A specification of a word
is essential, then I can implement it.
I quarrel about the meaning of ;: , and you casually mention
"do ;:" as if everybody knows what this is supposed to mean.
>
This is the specification of CO .
Note how the stack effect is ( -- ) .
For most Forthers this is a apparently a sufficient specification.
>
Oh, it clarifies everything!
You mean that "stack effect is ( -- )" clarifies everything?
You must be sarcastic.
This was an invitation to show a specification of ;; in the same vein.
>
If we assume ;: to be "EXECUTE" and YIELD to be "R> EXECUTE" then ;: can
be coded as ">R YIELD" and YIELD (aka CO) as "R> ;:".
So
: ;: >R YIELD ; \ Insert POSTPONE as appropriate
: YIELD R> ;; ; \ Insert POSTPONE as appropriate
Very illuminating.
You seem to imply that CO and YIELD are the same.
That doesn't help me one bit to understand ;: .
"
: ;: >R YIELD ;
"
is an accidental implementation that almost certainly doesn't work
on gforth or ciforth.
There are two problems with it:
1. Unbalanced return stack
2. YIELD is not defined.
>
And I can assure you that works.. No matter which definition you apply
to those words - either inlined or high level.
>
I think that definitely proves the two words are intimately related ;-)
>
Hans Bezemer
>
-- Temu exploits Christians: (Disclaimer, only 10 apostles)Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style WallArt For Home, Office And Garden Decor - Perfect For Windows, Bars,And Gifts For Friends Family And Colleagues.