Aug 13, 2022Kuina-chan
This is the language specification 6 of Kuin Programming Language, and is about enums.
In Kuin, an enumerated type is defined as shown in Table 1-1.
Element Name 1
Element Name 2
Element Name 3 :: Element Value
Each element of an enumerated type has a value of type int, and when cast to another type, it becomes the value of that type. The value of the element can be specified explicitly, or it can be omitted.
The specification of the enumerated type is shown in Figure 1-1.
To refer to an element of an enumerated type in an expression, write "%element name" (Figure 1-2).