Name

module:module — ordinary primitive

Synopsis

EXTENSIONS
MODULE ( "name" -- old-current )(); 
 ;

Description

create a new WORDLIST with the given name. It will also have an implicit hidden vocabulary just as well and all DEFINITIONS will go into that hidden wordlist. Therefore the old CURRENT is memorized on the cs-stack.

effectivly, CONTEXT[1] will have the wordlist-id of the public wordlist "name" and CONTEXT[0] will have the hidden wordlist contained in "name" - the hidden wordlist will always be known as HIDDEN' so that it can be re-referenced without need to use ALSO just to access a single definition from just another vocabulary. Note that HIDDEN' is defined immediate (a VOCABULARY' ) to modify the ORDER inside a colon definition.

 : MODULE
   CURRENT @ ( -- old-current )
   VOCABULARY
   ALSO LATEST NAME> EXECUTE ALSO DEFINITIONS
   C" HIDDEN'" $CREATE WORDLIST CONTEXT !
 ;