enum <enum name>
<enum fields>
end
enum name
- any combination of letters, digits and _
enum fields
- one or many lines with the format:
<enum field name> [= <enum field value>]
where
enum field name
- any combination of letters, digits and _
enum field value
- a number or a string literal enclosed in double quotes. if not present, the compiler assigns a new value automatically.Town.LS
is equal to 0
, Town.SF
is equal to 1
and Town.LV
is equal to 2
.TicTacToe.Player1
is equal to X
and TicTacToe.Player2
is equal to O
.0
for the first field, 1
for the second field, 2
for the third and so on:Town.LS
is equal to 0
, Town.SF
is equal to 1
and Town.LV
is equal to 2
.1
E.A
= 10
, E.B
= 11
, E.C
= 100
, E.D
= 101
, E.E
= 102
Month.Jan
= "January"
,
Month.Feb
= "February"
,
Month.March
= "March"