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,291 of 117,927   
   dxf to Anton Ertl   
   Re: QUIT and ABORT   
   05 May 25 14:11:54   
   
   From: dxforth@gmail.com   
      
   On 4/05/2025 11:33 pm, Anton Ertl wrote:   
   > ...   
   > Here's the code I give to the Forth systems:   
   >   
   > 1 .( a ) cr -56 throw .( b )   
   > .s   
   > 2 .( a ) cr quit .( b )   
   > .s   
   > : foo 3 -56 throw ; ' foo catch 5   
   > .s   
   > : bar 4 quit ; ' bar catch 6   
   > .s   
   >   
   > Let's see what different Forth systems do:   
   > ...   
      
   In DX-Forth QUIT is not CATCHable thus -56 THROW simply returns:   
      
     a   
       THROW #-56   
      
   However modifying it to do so gives these results:   
      
   1 .( a ) cr -56 throw .( b )   
      
     'a' is displayed and the stack is: 1   
      
   2 .( a ) cr quit .( b )   
      
     'a' is displayed and the stack is: 2   
      
   : foo 3 -56 throw ; ' foo catch 5   
      
     stack is: -56 5   
      
   : bar 4 quit ; ' bar catch 6   
      
     stack is: -56 6   
      
   --- 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