Home

enumerated

Enumerated, as an adjective, means listed or counted in a sequence. In mathematics and computer science, enumeration refers to listing the elements of a set. The term is used in several related concepts, including enumerated types in programming, which constrain a value to a finite set of named constants.

Enumerated type, or enum, is a data type that defines a fixed set of named values called

Implementation varies by language. In C and C++, enums define integral constants; the underlying type is typically

Beyond programming, enumeration is a common process of counting and listing items. It underpins data modeling,

enumerators.
Enums
are
used
to
represent
discrete
categories
or
states
and
to
improve
code
readability
and
safety
by
restricting
variables
to
valid
values.
int,
with
values
starting
at
0
by
default
unless
overridden.
C++11
introduces
scoped
enums
(enum
class)
that
are
strongly
typed
and
do
not
implicitly
convert
to
integers.
In
Java
and
C#,
enums
are
full-fledged
types
that
behave
like
classes
with
methods
and
fields
and
are
type-safe.
In
Python,
the
enum
module
provides
classes
such
as
Enum
for
defining
named
constants.
In
Rust
and
Swift,
enums
are
algebraic
data
types
that
can
carry
additional
data
with
each
variant.
user
interface
choices,
and
algorithms
that
require
finite,
named
options.