In article <2024Mar10.193700@mips.complang.tuwien.ac.at>,   
   Anton Ertl wrote:   
   >minforth@gmx.net (minforth) writes:   
   >>Although I find it obvious and not worth the hassle, the specification   
   >>should be amended so that "a program shall not use the return stack to   
   >>pass data between outer and inner functions, i.e. from an enclosing word   
   >>to its inner quotation(s) of any nesting depth, or from a quotation to   
   >>its outer enclosing word regardless of its nesting depth".   
   >   
   >If you think so, make a proposal. In the rest of the standard, the   
   >compilation semantics of control-flow words communicate through the   
   >control-flow stack, which usually is the data stack. I see no reason   
   >to make an exception for [: ... ;].   
   >   
   >>This is the most expected way because analogously   
   >>   
   >> 123 >r :noname r> lit, ;   
   >>   
   >>is also not guaranteed to work in ISO Forth.   
   >   
   >However,   
   >   
   >: foo 123 >r :noname r> postpone literal postpone ; ;   
   >foo execute . \ prints 123   
   >   
   >is guaranteed to work in Forth-94 (ISO Forth) and Forth-2012.   
      
   >   
   I thought that   
   "   
    123 >r : noname r> postpone literal ;   
    noname . \ prints 123   
   "   
   is not guaranteed to work in Forth-94 (ISO Forth).   
   Why is this different?   
   This is assuming >R works in interpret mode, such as gforth.   
      
   Ignore the previous answer, I forget to delete a postpone.   
      
   >   
   >- anton   
      
   Groetjes Albert   
   --   
   Don't praise the day before the evening. One swallow doesn't make spring.   
   You must not say "hey" before you have crossed the bridge. Don't sell the   
   hide of the bear until you shot it. Better one bird in the hand than ten in   
   the air. First gain is a cat purring. - the Wise from Antrim -   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|