Delete a member from an existing enumerator type.

A member may only be removed if the member is no longer being used. Otherwise an operation_err() is raised.


mod_enum(enum, 'del', name)


Argument Type Description
enum str Name of the enumerator type where the member has to be removed from.
'del' str Passing this argument will result in a delete action.
name str Name of the member to be removed.

Return value

The value nil.

This code shows how to use the action del:

// Create enum `Color`
set_enum('Color', {
    RED: '#ff0000',
    BLUE: '#00ff00'

// Remove `BLUE` from enum `Color`
mod_enum('Color', 'del', 'BLUE');

Return value in JSON format