Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: sjack@dontemail.me (sjack) Newsgroups: comp.lang.forth Subject: Re: "Back & Forth" - Local variables Date: Sun, 16 Mar 2025 21:23:14 -0000 (UTC) Organization: A noiseless patient Spider Lines: 27 Message-ID: References: <926bcdb22f5b30036f236dc5351dcb1b124a3f6e@i2pn2.org> Reply-To: sdwjack69@gmail.com Injection-Date: Sun, 16 Mar 2025 22:23:14 +0100 (CET) Injection-Info: dont-email.me; posting-host="6d9da83f66c5b7403af0bc056a019183"; logging-data="2712971"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX197X/8katDx7e3M7vBQI4jF" User-Agent: tin/2.6.4-20240224 ("Banff") (Linux/6.8.0-55-generic (x86_64)) Cancel-Lock: sha1:UlHAGr2SXKbDNvojCp53XyOStDo= sjack wrote: > Hans Bezemer 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