forked from fox-archives/volant
-
Notifications
You must be signed in to change notification settings - Fork 4
Enums
Apoorv Singal edited this page Aug 30, 2020
·
1 revision
Enum is a user-defined data type in Volant. It is mainly used to assign names to integral constants, the names make a program easy to read and maintain.
Enums are defined using the enum
keyword.
enum Name {
Name1 = optionalIntegralValue,
Name2 = optionalIntegralValue,
...
};
enum TestEnum { Prop1, Prop2 };
var: TestEnum;
var = TestEnum.Prop1;