Sujet : Re: Back & Forth - Co-routines
De : no.email (at) *nospam* nospam.invalid (Paul Rubin)
Groupes : comp.lang.forthDate : 09. Feb 2025, 23:30:28
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87a5auwy2j.fsf@nightsong.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
minforth@gmx.net (minforth) writes:
FWIW a single quotation-based counter in another Forth:
>
MinForth 3.6 (32 bit)
# defer ctr ok
# : init { n } [: n 1+ dup to n ;] ; ok
# 4 init is ctr ok
# ctr . 5 ok
Questions:
1) where does the storage cell for n live, after init has returned?
2) what if you make more than one counter?
3) why did you use defer instead of something like CONSTANT?
thanks