Skip to content

Commit

Permalink
Merge pull request #3232 from MicrosoftDocs/enum
Browse files Browse the repository at this point in the history
Update devenv-extensible-enums.md
  • Loading branch information
SusanneWindfeldPedersen committed Dec 7, 2021
2 parents 7178623 + 2020109 commit 537121e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dev-itpro/developer/devenv-extensible-enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ ms.author: solsen
---

# Extensible Enums

An enumeration type, also known as an enum in programming, is a keyword used to declare a type that consists of a set of named constants. The list of named constants is called the enumeration list. Enums can be used as table fields, local and global variables, and parameters.

To declare an `enum` in AL you must specify an ID and a name. The enumeration list consists of values and each of the values are declared with an ID and a value. The value ID is the ordinal value on the enumeration list and must be unique. The following example shows the declaration of an enum, which can be extended, and has the four values; **None**, **Bronze**, **Silver**, and **Gold**.
To declare an `enum` in AL you must specify an ID and a name. The enumeration list consists of values and each of the values are declared with an ID and a value. The value ID is the ordinal value on the enumeration list and must be unique. When the enum values are displayed in the UI they are sorted by the order of declaration. In addition, if extension **B** extends extension **A**, the enum values declared in extension **A** are displayed *before* the enum values declared in extension **B**.

The following example shows the declaration of an enum, which can be extended, and has the four values; **None**, **Bronze**, **Silver**, and **Gold**.

```AL
enum 50121 Loyalty
Expand Down

0 comments on commit 537121e

Please sign in to comment.