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,636 of 117,927   
   Gerry Jackson to Gerry Jackson   
   Re: recursion   
   15 Jul 24 23:44:05   
   
   From: do-not-use@swldwa.uk   
      
   On 15/07/2024 23:41, Gerry Jackson wrote:   
   > On 15/07/2024 20:37, Ruvim wrote:   
   >>   
   >>>>   
   >>>> RECURSIVE also allows you to tick the word in its own definition (not   
   >>>> possible with RECURSE), a feature that I actually have used;   
   >>   
   >> I think, there should be a standard method to get the xt of the   
   >> current definition (regardless whether it is a named definition, or   
   >> nameless definition).   
   >>   
   >   
   > It can be done by using DEFER as a forward definition   
   > e.g.   
   > defer foo   
   > :noname ... ['] foo defer@ ... ; is foo   
   >   
   > using DEFER@ gives the xt of the code, omittimg it gives the xt of the   
   > name.   
   >   
   > as FOO can be called by name by executing   
   >     synoname foo recurse   
          ^^^^^^^^   
   Sorry a typo   
        synonym foo recurse   
      
   > I would guess that your suggestion of FORWARD FOO could be defined using   
   > that and something like EXECUTE-PARSING e.g. copying "FOO RECURSE" to a   
   > buffer and doing:   
   >    BUF COUNT ' SYNONYM EXECUTE-PARSING   
   > followed by IMMEDIATE of course   
   >   
   > As DEFER can be used as a forward definition it can also be used for   
   > mutual recursion   
   >   
      
   --   
   Gerry   
      
   --- 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