www.delorie.com/gnu/docs/gforth/gforth_124.html   search  
Buy GNU books!

Gforth Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.14 Word Lists

A wordlist is a list of named words; you can add new words and look up words by name (and you can remove words in a restricted way with markers). Every named (and revealed) word is in one wordlist.

The text interpreter searches the wordlists present in the search order (a stack of wordlists), from the top to the bottom. Within each wordlist, the search starts conceptually at the newest word; i.e., if two words in a wordlist have the same name, the newer word is found.

New words are added to the compilation wordlist (aka current wordlist).

A word list is identified by a cell-sized word list identifier (wid) in much the same way as a file is identified by a file handle. The numerical value of the wid has no (portable) meaning, and might change from session to session.

The ANS Forth "Search order" word set is intended to provide a set of low-level tools that allow various different schemes to be implemented. Gforth also provides vocabulary, a traditional Forth word. `compat/vocabulary.fs' provides an implementation in ANS Forth.

doc-forth-wordlist doc-definitions doc-get-current doc-set-current doc-get-order doc--gforthman-set-order doc-wordlist doc-table doc->order doc-previous doc-also doc--gforthman-forth doc-only doc--gforthman-order

doc-find doc-search-wordlist

doc-words doc-vlist

doc-root doc-vocabulary doc-seal doc-vocs doc-current doc-context

5.14.1 Vocabularies  
5.14.2 Why use word lists?  
5.14.3 Word list example  

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003