Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.forth    |    Forth programmers eat a lot of Bratwurst    |    117,927 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 116,756 of 117,927    |
|    Anthony Howe to Ruvim    |
|    Re: single-xt approach in the standard    |
|    17 Sep 24 15:12:08    |
      From: achowe@snert.com              On 2024-09-17 06:54, Ruvim wrote:       > Do you think that the Forth standard should recognize the classic single-xt       > approach as possible for implementing a standard Forth system?       >       > The classic single-xt approach implies that only one execution token (xt) is       > associated with a name token (nt), and only one name token is associated       with a       > word (a named Forth definition). And words whose compilation semantics differ       > form default compilation semantics are implemented as immediate words.              Given I prefer single-xt (currently), what I don't get is how for a dual-xt       system you define a single word with two actions for interpret and compile. I       don't see a word to distinguish between the two, except maybe IMMEDIATE.              > : s" ( "ccc" -- sd | )       > [char] " parse       > state @ if postpone sliteral exit then       > dup >r allocate throw tuck r@ move r>       > ; immediate              Do you define the same word twice, once for compile (immediate) and again for       interpret (order of definitions should not be important). Example:              : s" ( "ccc" -- sd | ) postpone sliteral ; immediate       : s" ( "ccc" -- sd | ) dup >r allocate throw tuck r@ move r> ;                     --       Anthony C Howe       achowe@snert.com BarricadeMX & Milters       http://nanozen.snert.com/ http://software.snert.com/              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca