V25 with 64-bit support
[pforth] / fth / t_case.fth
CommitLineData
bb6b2dcd 1\ test CASE\r
2anew test-case\r
3: TCASE ( N -- )\r
4 CASE\r
5 0 OF ." is zero" ENDOF\r
6 1 OF\r
7 2 choose\r
8 CASE\r
9 0 OF ." chose zero" ENDOF\r
10 1 OF ." chose one" ENDOF\r
11 [ .s cr ." of-depth = " of-depth @ . cr ]\r
12 ENDCASE\r
13 ENDOF\r
14 [ .s cr ." of-depth = " of-depth @ . cr ]\r
15 ENDCASE\r
16;\r