Macro
enum
type. fli
define-c-enum name &rest enumerator-list => list
enumerator-list ::= {entry-name | (entry-name entry-value)}*
The name of the new enumeration type specifier.
A sequence of symbols, possibly with index values, constituting the enumerator type.
A symbol.
An index value for an entry-name.
The list(:enum
name)
.
define-c-enum
is used to define an FLI enumerator type specifier, which corresponds to the Cenum
type. It is a convenience function, as an enumerator type could also be defined usingdefine-foreign-type
. (def-c-enum colors red green blue) enum colors { red, green, blue};
(def-c-enum half_year (jan 1) feb mar apr may jun) enum half_year { jan = 1, feb, mar, apr, may, jun }