Digest #115 2020-09-02


[153] 2020-09-01 17:41:58 AntonErtl wrote:

proposal - Traverse-wordlist does not find unnamed/unfinished definitions


M. Anton Ertl

Change Log:

Initial version


Does TRAVERSE-WORDLIST find unfinished or nameless definitions?


It does not.



Execute xt once for every word in the wordlist wid,


Execute xt once for every named and findable word in the wordlist wid,


This is a wording change. The use of "findable" is taken from it's use in the definition of ":" an DOES>. Possible problem: A shadowed word is not findable with FIND, FIND-NAME-IN etc, but may be reached with TRAVERSE-WORDLIST.

[154] 2020-09-01 21:16:26 GeraldWodni wrote:

proposal - XML Forth Standard - migration from LaTeX to DocBook


Peter Knaggs

Problem & Solution:

The author, who is also the editor of the Forth Standard is considering migrating from LaTeX to XML. The idea being that XML is easier to parse for machines while maintaining being editable by humans. Please read the proposed PDF. More material including DTD, TEX, HTML and the XML example below.


I have been thinking of using either XML Notepad or XXE (XMLmind XML Editor) as the editor environment and move the whole standard into DocBook. That way I get PDF, XHTML and EPUB with very little work.


At this stage the author is asking for feedback:

  • How do you like the XML definition for words?
  • Would your system/documentation also output this XML definitions for its own words?
  • Any other related feedback?

Example Code:

<worddef name="DOES&gt;" id="core:DOES" number="1250" wordlist="CORE" english="does">
            Interpretation semantics for this word are undefined.

            <stack type="C">
                Append the run-time semantics below to the current
                Whether or not the current definition is rendered
                findable in the dictionary by the compilation of
                <word word="core:DOES" /> is implementation defined.
                Consume \<param\>colon-sys_1</param> and produce
                \<param\>colon-sys_2</param>. Append the initiation
                semantics given below to the current definition.
            <stack type="R">\<pre\>next-sys_1</pre></stack>
                Replace the execution semantics of the most recent
                definition, referred to as \<param\>name</param>, with
                the \<param\>name</param> execution semantics given
                below. Return control to the calling definition
                specified by \<param\>nest-sys_1</param>. An ambiguous
                condition exists if \<param\>name</param> was not
                defined with <word word="core:CREATE" /> or a
                user-defined word that calls <word word="core:CREATE"/>.
                \<post\>i*x a-addr</post>
            <stack type="R">
                Save implementation-dependent information
                \<param\>nest-sys_2</param> about the calling definition.
                Place \<param\>name</param>'s data field address on the
                stack. The stack effects \<param\>i*x</param> represent
                arguments to \<param\>name</param>.
        <execute type="name">
                Execute the portion of the definition that begins with
                the initiation semantics appended by the
                <word word="core:DOES" /> which modified
                \<param\>name</param>. The stack effects \<param\>i*x</param>
                and \<param\>j*x</param> represent arguments to and
                results from \<param\>name</param>, respectively.
            <wref word="core:CREATE" />
            Typical use:
            \<c\>: X ... DOES&gt; ... ;</c>
            Following <word word="core:DOES" />, a Standard Program
            may not make any assumptions regarding the ability to find
            either the name of the definition containing the
            <word word="core:DOES"/> or any previous definition whose
            name may be concealed by it. <word word="core:DOES" />
            effectively ends one definition and begins another as far
            as local variables and control-flow structures are
            The compilation behavior makes it clear that the user is
            not entitled to place <word word="core:DOES"/> inside any
            control-flow structures.
        \<test\>\<pre\>: DOES1 DOES&gt; @ 1 + ;</pre>\<post\></post></test>
        \<test\>\<pre\>: DOES2 DOES&gt; @ 2 + ;</pre>\<post\></post></test>
        \<test\>\<pre\>CREATE CR1</pre>\<post\> </post></test>
        \<test\>\<pre\>CR1  </pre>\<post\>HERE</post></test>
        \<test\>\<pre\>1 ,  </pre>\<post\> </post></test>
        \<test\>\<pre\>CR1 @</pre>\<post\>1</post></test>
        \<test\>\<pre\>DOES1</pre>\<post\> </post></test>
        \<test\>\<pre\>CR1  </pre>\<post\>2</post></test>
        \<test\>\<pre\>DOES2</pre>\<post\> </post></test>
        \<test\>\<pre\>CR1  </pre>\<post\>3</post></test>

        \<test\>\<pre\>: WEIRD: CREATE DOES&gt; 1 + DOES&gt; 2 + ;</pre>\<post\></post></test>
        \<test\>\<pre\>WEIRD: W1</pre>\<post\></post></test>
        \<test\>\<pre\>' W1 &gt;BODY</pre>\<post\>HERE   </post></test>
        \<test\>\<pre\>W1       </pre>\<post\>HERE 1 +</post></test>
        \<test\>\<pre\>W1       </pre>\<post\>HERE 2 +</post></test>


[r451] 2020-09-01 14:18:46 GeraldWodni replies:

proposal - Multi-Tasking Proposal

An implementation by Andrew Haley can be found here: https://sourceforge.net/projects/concurrentforth/

[r452] 2020-09-01 15:31:12 BerndPaysan replies:

proposal - Remove the “rules of FIND”

Replace the parenthesis text “(according to the rules in the system's FIND)” with “in the current search order”. Since we don't have a term “search order” in the definitions of terms, section 2, only in the search order word set, move that to the definition of terms, and change it:

search order: A list of word lists specifying the order in which the dictionary will be searched. If the search order wordset is not present, the search order consists of all the word lists that contain definitions.

to the definitions of terms.

[r453] 2020-09-01 16:17:01 GeraldWodni replies:

proposal - VOCABULARY

Vocabulary proposal

version uh 2019-09-18

Add the following section to the Forth-200x standard in the optional Search-Order word set to the Search-Order extension word list. VOCABULARY
( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Create a new empty word list wid and associate it with name.

name is referred to as a "vocabulary".

name Execution:
( -- )
Replace the first word list in the search order by the word list wid that is associated with the vocabulary. An ambiguous condition exists if there are no word lists in the search order.


Rationale: VOCABULARY has been used in traditional Forth systems and it is available with consistent behaviour in many standard systems. So it seems worthwhile to standardize it (again, it has been standardized in Forth-83).

Typical use:


ONLY FORTH ALSO Assembler DEFINITIONS ( set search order to  ... FORTH Assembler Assembler )

Reference Implementation:

   DOES> ( -- ) @ 

Other additions

Add the following ambigous condition to

  • executing a vocabulary word when the search order is empty (

[r454] 2020-09-01 17:43:40 AntonErtl replies:

comment - Unfindable definitions

Addressed in this proposal.

[r455] 2020-09-01 19:34:59 BerndPaysan replies:

proposal - Remove the “rules of FIND”

Replace the text

Return a true flag if name is the name of a word that can be found (according to the rules in the system's FIND); otherwise return a false flag.


Try to find name. Return a true flag if name can be found; otherwise return a false flag.

Add the following redefinition of the term “find” to 16.2:

find: To search the search order for a definition name matching a given string.

Cross-reference 2.1 find and 16.2 find.