Is it possible to get the list of all words which are currently defined in Forth (for example in Gforth)?
Asked
Active
Viewed 1,743 times
1 Answers
10
Standard WORDS
word prints all the words from the top vocabulary (wordlist) only — see the specification .
TRAVERSE-WORDLIST proposal defines API to enumerate words in given wordlist. Some Forth-systems already implemented this proposal ([update] it is already in the draft).
Although there is no standard API to enumerate all defined wordlists. GET-ORDER
gives a list of the context wordlists only (i.e. wordlists in the scope).
Some Forth-systems have VOCS
word that prints all defined vocabularies.
Other possible APIs are specific for particular Forth-system. For example, SP-Forth has ENUM-VOCS
word to enumerate all known wordlists.

ruvim
- 7,151
- 2
- 27
- 36