• What with `` BL WORD ''

    From albert@spenarnc.xs4all.nl@21:1/5 to All on Sun Dec 15 15:32:17 2024
    Traditionally BL WORD places a word from the input stream,
    (terminal input buffer, stream buffer or file buffer)
    onto HERE where it can be fetched by $@-BD ( aka COUNT).
    Even gforth does this, and undoubtedly many legacy programs
    will crash on gforth, if it does behave otherwise.
    (Tested on gforth 0.7.3).
    [The idea was that it is the name of a colon word, and the
    laborious task of copying it from the input buffer should not
    be done only once, so the headers were defined such that the name
    was in the right place. This dates from the seventies of the last
    century.]


    Reading iso93 section 3.3.3.6.
    A lot of interference can be avoided to define
    CREATE PAD ALLOT ALIGN
    A permanent region could serve as a transient region, so
    from the users of PAD there is no problem.
    Common sense dictates that the simultaneous use of PAD for conflicting
    purposes should be avoided, as is the same now.

    In view of Gigabyte memories, a lot of interference could also be
    avoided, if BL WORD were entitled to ALLOT the space.
    A permanent region could serve as a transient region, so
    from the users of WORD there is no problem.

    : WORD WORD DUP COUNT ALLOT ALIGN ; \ Or some such.

    Is this in conflict with the standard?


    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to albert@spenarnc.xs4all.nl on Sun Dec 15 16:08:33 2024
    albert@spenarnc.xs4all.nl writes:
    In view of Gigabyte memories, a lot of interference could also be
    avoided, if BL WORD were entitled to ALLOT the space.
    A permanent region could serve as a transient region, so
    from the users of WORD there is no problem.

    : WORD WORD DUP COUNT ALLOT ALIGN ; \ Or some such.

    Is this in conflict with the standard?

    Yes. In

    create foo bl word bar drop 1234 ,
    foo @ .

    the standard specifies that this prints "1234", but with your
    redefinition of WORD, it does not.

    More formally, the standard specifies that the memory allocated by ,
    is contiguous with the data space of FOO, and WORD is not one of the
    words that terminates a contiguous region.

    - anton
    --
    M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
    comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
    New standard: https://forth-standard.org/
    EuroForth 2024: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to Anton Ertl on Mon Dec 16 11:42:44 2024
    In article <2024Dec15.170833@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    albert@spenarnc.xs4all.nl writes:
    In view of Gigabyte memories, a lot of interference could also be
    avoided, if BL WORD were entitled to ALLOT the space.
    A permanent region could serve as a transient region, so
    from the users of WORD there is no problem.

    : WORD WORD DUP COUNT ALLOT ALIGN ; \ Or some such.

    Is this in conflict with the standard?

    Yes. In

    create foo bl word bar drop 1234 ,
    foo @ .

    the standard specifies that this prints "1234", but with your
    redefinition of WORD, it does not.

    More formally, the standard specifies that the memory allocated by ,
    is contiguous with the data space of FOO, and WORD is not one of the
    words that terminates a contiguous region.

    Thanks. So if you are worried about transient storage interfering with
    each other, the solution is to have a static buffer reserved for WORD.
    I'll do that.


    - anton
    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)