RosettaCodeData/Task/Conditional-structures/Smalltalk/conditional-structures-4.st

10 lines
139 B
Smalltalk

|x|
x := 1.
value :=
x caseOf: {
[1]->['one'].
[2]->['two'].
[3]->['three']
}
otherwise:['none of them'].