Enumerated Type

Why Trust Techopedia

What Does Enumerated Type Mean?

Enumerated type is a user-defined data type used in computer programming to map a set of names to numeric values. Enumerated data type variables can only have values that are previously declared. In other words, they work with a finite list of values.

Advertisements

Enumerated data types help make the code more self-documenting and prevent programmers from writing illogical code on values of enumerators. Enumerated data also hides unnecessary details from programmers.

Techopedia Explains Enumerated Type

Enumerator names usually behave as constants in programming languages, although they are identifiers in most ways. A variable assigned as enumerated type can have any of the enumerators as value.

In certain languages, enumerator data types many be built into the language. Many programming languages permit users to define new enumerated types and certain programming languages also define the ordering that needs to be followed for the members associated with enumerated data types. The enumerators are unique, but certain programming languages do permit the enumerator to be listed twice in the declaration of the type.

Advertisements

Related Terms

Margaret Rouse
Technology expert
Margaret Rouse
Technology expert

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.