RosettaCodeData/Task/Conditional-structures/Forth/conditional-structures-4.fth

7 lines
122 B
Forth

: test-case ( n -- )
CASE
0 OF ." Zero!" ENDOF
1 OF ." One!" ENDOF
." Some other number!"
ENDCASE ;