Sujet : Re: Back & Forth - Co-routines
De : sjack (at) *nospam* dontemail.me (sjack)
Groupes : comp.lang.forthDate : 07. Feb 2025, 18:50:02
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vo5h4a$3jopq$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : tin/2.6.4-20240224 ("Banff") (Linux/6.8.0-52-generic (x86_64))
minforth <
minforth@gmx.net> wrote:
However because local names are not compiled into dictionary data
space, but use their own transient dictionary entries, which
>
-- The goal then is nesting a definition to space outside of the
-- dictionary. Using what's at hand, Toad version of Wil Baden's local
-- macros:
: foo
[ '." xyz"' /mm: bar ]
mm bar
;
-- executing the nested code from the parent word
i. foo --> xyz
-- executing the code after the parent word has terminated.
i. mm bar --> xyz
-- Can also pass value to the local definition
: foo
'+ mmx: bardat' eval
%'mm bardat ." xyz: " .' /mm: bar% eval
'mm bar' eval
;
i. 40 2 foo --> xyz: 42
i. mm bar --> xyz: 42
-- me