
reference.language.enumerations.html Maven / Gradle / Ivy
Enumerations
Enumerations
An enumeration is a list of names for constant values of a particular type.
Enumerations are practical to refer to values using symbols, rather than provide the same value again and again in your code.
Prompto supports enumerations of both built-in and user defined types.
This section describes enumerations of built-in types.
The below is an example:
Enumerated symbols are global definitions. You cannot redefine the above name NORTH
elsewhere.
Enumeration symbols must be composed of uppercase letters, digits and '_' only. The first character cannot be a digit.
This makes it easy to recognize enumerated symbols at first glance.
Once an enumerated symbol is defined, it can be used anywhere in place of the value itself.
Enumeration attributes
Each enumerated symbol has the following attributes:
name
: returns the name of the enumerated symbol as a Text value
value
: returns the value represented by the enumerated symbol.
The exact type of the value is determined by the exact type of the enumeration
The enumeration itself has the following attributes:
symbols
: returns a List of the symbols in the enumeration
Enumerations of user defined types
Prompto supports Enumerations of user defined types. See Categories for details.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy