"Search-order + extensions"

search
The Search Order Word Set as defined by the Standard.

Note that there a some extensions in the Portable
Forth Environment. Wordlists can be made case-sensitive
always or only at request. Wordlists can be linear
or hashed vocabularies. There are other words to
recursivly search an implicit vocabulary along with another.
Tektronix CTE %version: bln_mpt1!5.9 % GNU LGPL
[ANS]
* DEFINITIONS ( -- )

make the current context-vocabulary the definition-vocabulary,
that is where new names are declared in. see ORDER

search ordinary primitive

* GET-CURRENT ( -- voc )

return the current definition vocabulary, see DEFINITIONS

search ordinary primitive

* GET-ORDER ( -- vocn ... voc1 n )

get the current search order onto the stack, see SET-ORDER

search ordinary primitive

* SEARCH-WORDLIST ( str-ptr str-len voc -- 0 | xt 1 | xt -1 )

almost like FIND or (FIND) -- but searches only the
specified vocabulary.

search ordinary primitive

* SET-CURRENT ( voc -- )

set the definition-vocabulary. see DEFINITIONS

search ordinary primitive

* SET-ORDER ( vocn ... voc1 n -- )

set the search-order -- probably saved beforehand using
GET-ORDER

search ordinary primitive

* WORDLIST ( -- voc )

return a new vocabulary-body for private definitions.

search ordinary primitive

* ALSO ( -- )

a DUP on the search ORDER - each named vocabulary
replaces the topmost ORDER vocabulary. Using ALSO
will make it fixed to the search-order. (but it is
not nailed in trap-conditions as if using DEFAULT-ORDER )
 order:   vocn ... voc2 voc1 -- vocn ... voc2 voc1 voc1

search ordinary primitive

* ORDER ( -- )

show the current search-order, followed by
the CURRENT DEFINITIONS vocabulary
and the ONLY base vocabulary

search ordinary primitive

* PREVIOUS ( -- )

the invers of ALSO , does a DROP on the search ORDER
of vocabularies.
 order: vocn ... voc2 voc1 -- vocn ... voc2 
 example: ALSO PRIVATE-VOC DEFINTIONS (...do some...) PREVIOUS DEFINITIONS

search ordinary primitive

* FORTH-WORDLIST ( -- voc )

return the voc-address of the base FORTH-vocabulary
(quite often the actual name is not FORTH )

search loader code P4_DVaL

hook to activate pfe extensions:
FORTH
* DEFAULT-ORDER ( -- )

nail the current search ORDER so that it will even
survive a trap-condition. This default-order can be
explicitly loaded with RESET-ORDER

search ordinary primitive

* RESET-ORDER ( -- )

load the DEFAULT-ORDER into the current search ORDER
- this is implicitly done when a trap is encountered.

search ordinary primitive

ENVIRONMENT ENVIRONMENT SEARCH-ORDER-EXT

no special info, see general notes

search ordinary constant

ENVIRONMENT WORDLISTS

no special info, see general notes

search ordinary constant

ENVIRONMENT CHAIN-WORDLISTS

no special info, see general notes

search ordinary constant