1 \ Vocabulary management
4 BL WORD FIND >LINK ( find the word, gets the dictionary entry address )
5 DUP @ LATEST ! ( set LATEST to point to the previous word )
6 H ! ( and store H with the dictionary address )
10 BL WORD FIND DROP >NAME
11 DUP @ F_HIDDEN OR SWAP !
14 : VOCAB>LATEST ( vcfa -- vlatest )
17 \ Create new vocabulary
21 body> context #context @ 1- + !
25 context #context @ 1- + @ current !
28 \ Define root vocabulary (always available)
43 context #context @ + dup 1- @ swap !
51 \ Display search order and compilation dictionary
55 context #context @ 1- + context swap
60 \ Current (definitions)
65 \ Display transient vocabulary contents
68 context #context @ 1- + @
71 ?DUP ( while link pointer is not 0 )
73 DUP ?HIDDEN NOT IF ( ignore hidden words )
74 DUP 1+ .NAME ( but if not hidden, print the word )
77 @ ( dereference the link pointer - go to previous word )
82 only forth also definitions