1\  Test case, not only of a branch going over too, too large a range
2\       but also of overflowing the output buffer
3\  Body generated by the same script used for the too-large branch test,
4\      but with much larger arguments.
5\  (Argument of 924 just does it.)
6
7fcode-version2          \  Sixteen-bit offsets.
8
9headers
10
11: too-large-case ( n -- )
12
13    ." Let's give it a large back-reference too."
14    begin  ." We've just begun"
15     ." 1 0 do " cr 1 0 do
16    dup  ." if " cr
17    if
18        dup ." case"
19	case
20	0 of  ."  Just a short case" cr endof
21	." default.  The Big One!" cr
22
23    fload  TooTooLargeBuffer_body.fth
24
25        endcase
26    ." then"
27    then
28       ." Loop back and forward" cr loop
29
30   ."  And here we are!"
31   exit
32   ."  Well, we needed some way out!"
33
34    again  ."  Back to the fuchsia."
35;
36
37\  Let's make a small jump, just to see what normal looks like
38: control-example
39    ."  Small non-loop"
40    begin   ."  Here's the beguine"
41
42    dup  ." if "
43    if
44        dup ." case"
45	case
46	0 of  ."  Just a short case" cr endof
47	." default.  Normal one!" cr
48        endcase
49    ." then"
50    then
51
52       ." and the way out"
53   exit
54       ." and the jump back"
55    again   ."  Never do this" cr
56;
57
58fcode-end
59