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,501 of 117,927   
   Ruvim to Anton Ertl   
   Stack notation (was: d/dx in forth)   
   28 May 24 21:39:55   
   
   From: ruvim.pinka@gmail.com   
      
   On 2024-05-24 15:56, Anton Ertl wrote:   
   > melahi_ahmed@yahoo.fr (Ahmed) writes:   
   >>   
   >>   In Forth it is a bit messier because you   
   >>   want a signature like   
   >>   
   >>   
   >>    : d/dx ( xt -- xt ) .... ;   
   >   
   > Most probably he meant ( xt1 -- xt2 )   
      
      
      
   Do you mean that ( xt -- xt ) is an incorrect stack diagram for this case?   
      
   I always thought that such use is correct. Because formally "xt"   
   (without an index) only denotes the data type, not a data value.   
      
   And "( xt -- xt )" does not mean that the data values before execution   
   and after execution are the same, since they may still be different.   
      
   In a stack diagram, the same data type symbols with the same indices   
   usually denote the same data value. Otherwise, if data values are not   
   mentioned (like "0", "-1", etc), it is unknown from the stack diagram   
   where the values are the same. Since different symbols in the does not   
   mean different data values. For example "abs ( n -- +n )" — in some   
   cases the data values "before" and "after" are the same.   
      
      
   --   
   Ruvim   
      
   --- 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