aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/chains-wordlist-test.frt
blob: 95a36a6f08c9f185393101274d230974a24d9170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
\ test the chains with wordlist backend

\ first create a named chain, identified by kette
chain: kette

\ now populate the chain with words, save the
\ existing definition word list on stack
get-current

\ chain>id is a parsing word
chain>id kette set-current
: s1 ." one " ;
: s2 ." two " ;

\ restore the previously used definition wordlist
set-current

\ show the content of the chain
chain>id kette show-wordlist

\ and finally execute the words in it.
kette \ prints "two one"