RosettaCodeData/Task/Enumerations/Wren/enumerations-2.wren

6 lines
196 B
Text
Raw Permalink Normal View History

2023-12-16 21:33:55 -08:00
import "./dynamic" for Enum
2023-07-01 11:58:00 -04:00
var Fruit = Enum.create("Fruit", ["apple", "orange", "pear", "cherry", "banana", "grape"], 1)
System.print(Fruit.orange)
System.print(Fruit.members[Fruit.cherry - 1])