Sujet : Re: "Back & Forth" - Local variables
De : sjack (at) *nospam* dontemail.me (sjack)
Groupes : comp.lang.forthDate : 14. Mar 2025, 20:36:42
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vr20g9$1up6b$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : tin/2.6.4-20240224 ("Banff") (Linux/6.8.0-55-generic (x86_64))
sjack <
sjack@dontemail.me> wrote:
More role play:
-- -- 'CO' is a co-processor -- : foo ." 1FOO " co ." 5BAR " ;: bat ." 2BAT " co ." 4CAT " ;cr i. foo bat .( 3boo ) --> 1FOO 2BAT 3boo 4CAT 5BAR -- -- ')' is also a co-processor-- : goo( ." GOO " ) ." GU " ;cr i. goo( foo bat .( 3boo ) ) --> GOO 1FOO 2BAT 3boo 4CAT 5BAR GU : rev. begin dup while . repeat drop ;
: rev( 0 ) rev. ;
i. rev( 1 2 3 4 ) --> 4 3 2 1
In FigForth SP! resets data stack. Toad extension XX ,a two tap,
does the same for ease and speed. Recall in old days it was
common to type .. to quickly clear the stack by entering an
invalid word.
-- me