\  Test case of a branch going over too large a range
\  Body generated by script.
\  (Numeric values, argument of 232 just exceeds the inner branches.)
\  (Numeric values, argument of N >= 233 exceeds them all.)
\  (Verbal argument of 179 just exceeds the inner branches.)
\  (Verbal argument of N >= 180 exceeds them all.)
\  Command-line definition of 'fld_cmd' should be of the form 'fload <filename>'
\  and can be used to load variable-sized bodies.

\  Default will be  TooLargeBranch_off16_body.fth

fcode-version2          \  Sixteen-bit offsets.

headers

: too-large-case ( n -- )

    ." Let's give it a large back-reference too."
    begin  ." We've just begun"
     ." 1 0 do " cr 1 0 do
    dup  ." if " cr
    if
        dup ." case"
	case
	0 of  ."  Just a short case" cr endof
	." default.  The Big One!" cr

[ifndef] fld_cmd
    fload  TooLargeBranch_off16_body.fth
[else]
    [defined] fld_cmd
[endif]

        endcase
    ." then"
    then
       ." Loop back and forward" cr loop

   ."  And here we are!"
   exit
   ."  Well, we needed some way out!"

    again  ."  Back to the fuchsia."
;

\  Let's make a small jump, just to see what normal looks like
: control-example
    ."  Small non-loop"
    begin   ."  Here's the beguine"

    dup  ." if "
    if
        dup ." case"
	case
	0 of  ."  Just a short case" cr endof
	." default.  Normal one!" cr
        endcase
    ." then"
    then

       ." and the way out"
   exit
       ." and the jump back"
    again   ."  Never do this" cr
;

fcode-end
