The documented CASE syntax:
http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Selection.html#Selection

terminates with

 ( n ) default-code ( n )
     ENDCASE ( )

but I grepped the source tree and
1 - nowhere after default-code is ( n ) seen.
2 - nowhere after ENDCASE is ( ) seen.

The best example I could find in the source tree was:

: compil...@local ( n -- ) \ gforth compile-f-fetch-local
 case
    0        of postpone f...@local0 endof
    1 floats of postpone f...@local1 endof
   ( otherwise ) dup postpone f...@local# ,
 endcase ;

And clearly there is no ( ) after ENDCASE.

I cant say whether there is ( n ) after default-code because I am
completely confused by this Forth code. It is far too advanced for me
to understand completely.

At any rate, I think a fully fleshed out simple example would be
helpful to Neophyte FORTHers.


Reply via email to