home bbs files messages ]

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,757 of 117,927   
   Stephen Pelc to Anthony Howe   
   Re: single-xt approach in the standard   
   17 Sep 24 23:04:25   
   
   From: stephen@vfxforth.com   
      
   On 17 Sep 2024 at 21:12:08 CEST, "Anthony Howe"  wrote:   
      
   > 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.   
      
   VFX Forth 64 is a single xt system (with sub-xts) . It manages to separate   
   compilation  and interpret actions for a word cleanly. S" is defined as below:   
      
   : S"            \ Comp: "ccc" -- ; Run: -- c-addr u      6.1.2165   
   \ *G Describe a string. Text is taken up to the next double-quote   
   \ ** character. The address and length of the string are returned.   
     [char] " parse >syspad   
      
   ndcs: ( -- )  discard-sinline  compile (s") ",  ;   
      
   NDCS: describes the non-default compilation sematics of the word. The   
   process of arriving at this model is described in several recent EuroForth   
   papers.   
   --   
   Stephen Pelc, stephen@vfxforth.com   
   MicroProcessor Engineering, Ltd. - More Real, Less Time   
   133 Hill Lane, Southampton SO15 5AF, England   
   tel: +44 (0)78 0390 3612,  +34 649 662 974   
   http://www.mpeforth.com   
      MPE website   
   http://www.vfxforth.com/downloads/VfxCommunity/   
      downloads   
      
   --- 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