From: ruvim.pinka@gmail.com   
      
   On 2024-08-11 12:38, albert@spenarnc.xs4all.nl wrote:   
   > In article , Ruvim    
   wrote:   
   >> On 2024-08-10 12:57, PMF wrote:   
   >>> I think !csp and ?csp are common also in other systems. I certainly did   
   >>> not invent them.   
   >>   
   >> Yes, it's a simple method to check the control-flow structures balance   
   >> from the FIG-Forth model.   
   >>   
   >> I would suggest avoiding this method in Forth implementations.   
   >   
   > It saved me a lot of mistakes. ciforth reports an error.   
   > If you care to look the error up in the documentation, you can see   
   > that you can turn this off, if you want to.   
      
      
   I don't mean removing this check. I mean using another implementation.   
      
   This check is easy to implement without being tied to stack depth.   
   For example:   
      
    -1023 here + constant colon-magic   
      
    : :noname ( -- xt colon-sys )   
    :noname colon-magic   
    ;   
      
    : : ( "name" -- colon-sys )   
    : colon-magic   
    ;   
      
    : ; ( colon-sys -- )   
    colon-magic <> -22 and throw   
    postpone ;   
    [ drop ] \ due to new `:` and old `;`   
    ; immediate   
      
    : does> ( colon-sys -- colon-sys )   
    colon-magic <> -22 and throw   
    postpone does> colon-magic   
    ; immediate   
      
      
      
   --   
   Ruvim   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|