Merge pull request #61 from philburk/docansi
[pforth] / fth / t_case.fth
CommitLineData
8e9db35f
PB
1\ test CASE
2anew test-case
3: TCASE ( N -- )
4 CASE
5 0 OF ." is zero" ENDOF
6 1 OF
7 2 choose
8 CASE
9 0 OF ." chose zero" ENDOF
10 1 OF ." chose one" ENDOF
11 [ .s cr ." of-depth = " of-depth @ . cr ]
12 ENDCASE
13 ENDOF
14 [ .s cr ." of-depth = " of-depth @ . cr ]
15 ENDCASE
16;