-- The Optional Search Order Word Set
Copyright (C) Tektronix, Inc. 1998 - 2001. All rights reserved.
description: 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.
FORTH
DEFINITIONS
( -- )(
)
;
p4:"definitions";
make the current context-vocabulary the definition-vocabulary, that is where new names are declared in. see ORDER
dpANS 16.6.1.1180 - standard forth word
FORTH
GET-CURRENT
( -- voc )(
)
;
p4:"get-current";
return the current definition vocabulary, see DEFINITIONS
dpANS 16.6.1.1643 - standard forth word
FORTH
GET-ORDER
( -- vocn ... voc1 n )( | ) ; |
; |
get the current search order onto the stack, see SET-ORDER
dpANS 16.6.1.1647 - standard forth word
FORTH
SEARCH-WORDLIST
( str-ptr str-len voc -- 0 | xt 1 | xt -1 )( | ) ; |
; |
almost like FIND or (FIND) -- but searches only the specified vocabulary.
dpANS 16.6.1.2192 - standard forth word
FORTH
SET-CURRENT
( voc -- )(
)
;
p4:"set-current";
set the definition-vocabulary. see DEFINITIONS
dpANS 16.6.1.2195 - standard forth word
FORTH
SET-ORDER
( vocn ... voc1 n -- )( | ) ; |
; |
set the search-order -- probably saved beforehand using GET-ORDER
dpANS 16.6.1.2197 - standard forth word
FORTH
WORDLIST
( -- voc )(
)
;
p4:"wordlist";
return a new vocabulary-body for private definitions.
dpANS 16.6.1.2460 - standard forth word
FORTH
ALSO
( -- )(
)
;
p4:"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
dpANS 16.6.2.0715 - standard forth word
FORTH
ORDER
( -- )(
)
;
p4:"order";
show the current search-order, followed by the CURRENT DEFINITIONS vocabulary and the ONLY base vocabulary
dpANS 16.6.2.1985 - standard forth word
FORTH
PREVIOUS
( -- )(
)
;
p4:"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
dpANS 16.6.2.2037 - standard forth word
FORTH
FORTH-WORDLIST
( .. )( | ) ; |
; |
- loader type P4_DVaL FORTH-WORDLIST
forth_wl (no special usage info)
dpANS 16.6.1.1595 - standard forth word
FORTH
DEFAULT-ORDER
( -- )(
)
;
p4:"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
FORTH
RESET-ORDER
( -- )(
)
;
p4:"reset-order";
load the DEFAULT-ORDER into the current search ORDER - this is implicitly done when a trap is encountered.
FORTH
RESET-ORDER-IS
( .. )( | ) ; |
; |
threadstate variable RESET-ORDER-IS
reset_order (no special usage info)
ENVIRONMENT
SEARCH-ORDER-EXT
( .. )( | ) ; |
; |
( 1994 ) constant SEARCH-ORDER-EXT
an ordinary constant (no special usage info)
ENVIRONMENT
CHAIN-WORDLISTS
( .. )( | ) ; |
; |
( P4_TRUE ) constant CHAIN-WORDLISTS
an ordinary constant (no special usage info)
ENVIRONMENT
SEARCH-LOADED
( .. )( | ) ; |
; |
constructor primitive SEARCH-LOADED
an executable word (no special usage info)
or wrapper call around p4_search_init