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 117,018 of 117,927   
   dxf to sjack   
   Re: "Back & Forth" - Local variables   
   11 Jan 25 09:59:02   
   
   From: dxforth@gmail.com   
      
   On 11/01/2025 2:50 am, sjack wrote:   
   > dxf  wrote:   
   >   
   >> Great.  While I've seen co-routines mentioned, examples were rare so I   
   >> tended to ignore it.   
   >>   
   >   
   > -- A closed paren defined as an immediate co-routine can be used at   
   > -- compile time to divide a word into two parts.   
   > -- At run-time the word's first part executes then performs co-routine   
   > -- and somewhere down the input ')' performs co-routine to return control   
   > -- back to the the word's second part.   
   > --   : foo( first part ) second part ;   
   > -- Example:   
   >   
   > : foo( ." --> " s0 @ sp! ) begin depth while 5 * . repeat ;  OK   
   >   
   > foo( 3 2 1 ) --> 5 10 15  OK   
   >   
   > I use 'hi( foo bar baz )' to highlight the output of a sequence of   
   > Forth words.   
      
   We'll see.  I'd like to be able to say 'yes, that's unequivocally   
   superior to any other solution I might use'.  I had that sense with   
   ... R> DROP ... to discard a nest-sys.  I may not use it every day in   
   programming but it's present in applications I use nearly every day.   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca