value

Returns the value of the enumerator member.

This function does not generate a change.

Function

member.value()

Arguments

None

Return value

Returns the name of the enumerator member.

Example

This code creates a closure with a doc string:

set_enum("Color", {
    RED: '#f00'
});

val = Color{RED}.value();

assert( is_str( val ) );  // the value is of type `str`

val.upper();  // Return the value upper case

Return value in JSON format

"#F00"