Creates a new enumerator type.
This function generates a change.
set_enum(enum, members)
Argument | Type | Description |
---|---|---|
enum | str | The name of the enumerator type to create. |
members | thing | Thing containing all the members to be set (or enum methods). |
The value nil
.
This code shows how to use set_enum():
set_enum('Status', {
OK: 0,
NOK: -1,
isOk: |this| this == Status{OK},
});
Return value in JSON format
null