Hash :
acf5213f
Author :
Date :
2006-10-14T20:31:53
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
\ Test case, not only of a branch going over too, too large a range
\ but also of overflowing the output buffer
\ Body generated by the same script used for the too-large branch test,
\ but with much larger arguments.
\ (Argument of 924 just does it.)
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
fload TooTooLargeBuffer_body.fth
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