Sujet : Re: "Back & Forth" - Local variables
De : sjack (at) *nospam* dontemail.me (sjack)
Groupes : comp.lang.forthDate : 16. Mar 2025, 22:23:14
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vr7fg2$2ipcb$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : tin/2.6.4-20240224 ("Banff") (Linux/6.8.0-55-generic (x86_64))
sjack <
sjack@dontemail.me> wrote:
Hans Bezemer <the.beez.speaks@gmail.com> wrote:
On 14-03-2025 13:51, albert@spenarnc.xs4all.nl wrote:
COUNT? For C@+? Anybody? ;-)
here 1 c, 2 c, 3 c, 4 c,
{ 4 0 do count . loop drop }
i. {} --> 1 2 3 4
FigForth COUNT normally operates on a 'byte' counted string but
can also be used to fetch a character and bump address.
And in the context of role play:
here 1 c, 2 c, 3 c, 4 c,
dup { 4 0 do count . loop drop } \ WTF!!! Where's the counted string?
i. {} --> 1 2 3 4
{ 4 0 do c@++ . loop drop } \ Obvious there ain't one here.
i. {} --> 1 2 3 4
-- me