From: dxforth@gmail.com   
      
   On 3/07/2025 10:17 pm, albert@spenarnc.xs4all.nl wrote:   
   > In article ,   
   > Hans Bezemer wrote:   
   >> On 03-07-2025 01:59, Paul Rubin wrote:   
   >>> Hans Bezemer writes:   
   >>>> 1. Adding general locals is trivial. It takes just one single line of   
   >>>> Forth.   
   >>>   
   >>> I don't see how to do it in one line, and trivial is a subjective term.   
   >>> I'd say in any case that it's not too difficult, but one line seems   
   >>> overoptimistic. Particularly, you need something like (LOCAL) in the   
   >>> VM. The rest is just some extensions to the colon compiler. Your   
   >>> mention of it taking 3-4 screens sounded within reason to me, and I   
   >>> don't consider that to be a lot of code.   
   >>   
   >> "Short" in my dictionary is. One. Single. Screen. No more. No less (pun   
   >> intended).   
   >>   
   >> And this one is one single screen. Even with the dependencies.   
   >> https://youtu.be/FH4tWf9vPrA   
   >>   
   >> Typical use:   
   >>   
   >> variable a   
   >> variable b   
   >>   
   >> : divide   
   >> local a   
   >> local b   
   >>   
   >> b ! a ! a @ b @ / ;   
   >>   
   >> Does recursion, the whole enchilada. One line.   
   >> Thanks to Fred Behringer - and Albert, who condensed it to a single   
   >> single line definition. Praise is where praise is due.   
   >   
   > Although 'local variables' like this are much preferred (superior) ,   
   > LOCAL (value) is what is asked for.   
   > If you don't have the akward, forward parsing TO already defined, you   
   > are bound to do more work.   
      
   OTOH those that use locals will likely be wanting the 'standard' one.   
   When ANS didn't deliver the locals users wanted all hell broke loose.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|