This is the ThingsDB documentation for version v0, click here for the latest version!

value

Returns the value of the enumerator member.

This function does not generate an event.

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"