Task

Create an enumeration of constants with and without explicit values.




// Without explicit values
enumeration FruitsKind
	APPLE,
	BANANA,
	CHERRY
end
 
program EnumerationTest
 
	function main()
		whatFruitAmI(FruitsKind.CHERRY);
	end
 
	function whatFruitAmI(fruit FruitsKind)
		case (fruit)
			when(FruitsKind.APPLE)
				syslib.writestdout("You're an apple.");
			when(FruitsKind.BANANA)
				syslib.writestdout("You're a banana.");
			when(FruitsKind.CHERRY)
				syslib.writestdout("You're a cherry.");
			otherwise
				syslib.writestdout("I'm not sure what you are.");
		end
	end
 
end