The following page contains reserved words. These are not part of the ANS Forth Standard. They are just proposed by various people and published here at FORTH.SF.NET for public review.

:NON:
:STD:

TOC


R.16 Search-Order reserved extension words


R.16.6.1.1643 CURRENT
SEARCH RES EXT
        ( -- wid-var-addr )

Most forth system do not need to react with special actions to a SET-CURRENT execution to set the current definition wordlist and instead the SET-CURRENT call will simply set a wordlist-variable that will be used by other forth defining words. This words returns the address of this variable. Therefore:

   : GET-CURRENT CURRENT @ ;
   : SET-CURRENT CURRENT ! ;
   : DEFINITIONS CONTEXT @ CURRENT ! ;

See: 16.6.1.1643 GET-CURRENT, 16.6.1.2195 SET-CURRENT, 16.6.1.1180 DEFINITIONS, R.16.6.1.1647 CONTEXT,


R.16.6.1.1647 CONTEXT
SEARCH RES EXT
        ( -- wid-var-addr )

Most forth system do not need to react with special actions to add a WORDLIST to the search ORDER. Many systems implement the ORDER as an array of wordlist-ids known as the CONTEXT array which has a length declared as the ENVIRONMENT WORDLISTS value. This word here returns an address to the topmost wordlist entry which is searched first by FIND. It is an ambiguous condition whether the returned value is constant and in which direction the other ORDER entries can be found, so the other entries of the CONTEXT array should be treated inaccessible directly and subject to the words GET-ORDER and SET-ORDER.

   : FORTH FORTH-WORDLIST CONTEXT ! ;
   : VOCABULARY HERE 0 , WORDLIST SWAP ! DOES> @ CONTEXT ! ;
   : DEFINITIONS CONTEXT @ CURRENT ! ;

See: 16.6.1.1643 GET-ORDER, 16.6.1.2195 SET-ORDER, 16.6.1.1180 DEFINITIONS, R.16.6.1.1643 CURRENT,


Table of Contents
Next Section