<< clearglobal Variables exists >>

Scilab Help >> Scilab > Variables > enumeration

enumeration

Get enumeration of a classdef or an object

Syntax

enumeration(classdef)
enumeration(object)
enums = enumeration(classdef)
enums = enumeration(object)

Arguments

classdef

Classdef from which we want to retrieve the enumeration

object

Object from which we want to retrieve the enumeration

enums

a string matrix of enumeration
If enumeration is called without output argument, the function only print list of enumeration.

Examples

classdef enum
    properties
        value = 0
    end

    methods
        function enum(val)
            arguments
                val = 0;
            end

            this.value = val;
        end
    end

    enumeration
        ONE(1)
        TWO(2)
        THREE(3)
        FOUR(4)
    end
end

enumeration(enum)
l = enumeration(enum)
e = enum();
enumeration(e)
l = enumeration(e)

See also

History

VersionDescription
2026.0.0 enumeration introduction.

Report an issue
<< clearglobal Variables exists >>