Name

pfe-search-ext ? Search-order + extensions

Synopsis

DEFINITIONS ( -- ) ?=>? ();?
"[ANS] FORTH";
?
GET-CURRENT ( -- voc ) ?=>? ();?
"[ANS] FORTH";
?
GET-ORDER ( -- vocn ... voc1 n ) ?=>? ();?
"[ANS] FORTH";
?
SEARCH-WORDLIST ( str-ptr str-len voc -- 0 | xt 1 | xt -1 ) ?=>? ();?
"[ANS] FORTH";
?
SET-CURRENT ( voc -- ) ?=>? ();?
"[ANS] FORTH";
?
SET-ORDER ( vocn ... voc1 n -- ) ?=>? ();?
"[ANS] FORTH";
?
WORDLIST ( -- voc ) ?=>? ();?
"[ANS] FORTH";
?
ALSO ( -- ) ?=>? ();?
"[ANS] FORTH";
?
ORDER ( -- ) ?=>? ();?
"[ANS] FORTH";
?
PREVIOUS ( -- ) ?=>? ();?
"[ANS] FORTH";
?
DEFAULT-ORDER ( -- ) ?=>? ();?
"FORTH";
?
RESET-ORDER ( -- ) ?=>? ();?
"FORTH";
?

Description

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

DEFINITIONS ( -- ) => "[ANS] FORTH"

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

GET-CURRENT ( -- voc ) => "[ANS] FORTH"

return the current definition vocabulary, see DEFINITIONS

GET-ORDER ( -- vocn ... voc1 n ) => "[ANS] FORTH"

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

SEARCH-WORDLIST ( str-ptr str-len voc -- 0 | xt 1 | xt -1 ) => "[ANS] FORTH"

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

SET-CURRENT ( voc -- ) => "[ANS] FORTH"

set the definition-vocabulary. see DEFINITIONS

SET-ORDER ( vocn ... voc1 n -- ) => "[ANS] FORTH"

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

WORDLIST ( -- voc ) => "[ANS] FORTH"

return a new vocabulary-body for private definitions.

ALSO ( -- ) => "[ANS] FORTH"

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
  

ORDER ( -- ) => "[ANS] FORTH"

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

PREVIOUS ( -- ) => "[ANS] FORTH"

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
  

DEFAULT-ORDER ( -- ) => "FORTH"

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

RESET-ORDER ( -- ) => "FORTH"

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