- AAs a literal string value
- BAs a numerical value
- CAs an alphabetical character
- DNone of the above
Time Taken:
Correct Answer:
Wrong Answer:
Percentage: %
Justification:
Correct Answer: As a numerical value
Related Lesson: Create a Base Enumeration
Justification:
Related Lesson: Create a Base Enumeration
Justification: A, C, D
Related Lesson: Create a Base Enumeration
Justification:
Justification:
You must create an enum type in the AOT before you can declare it.
|
Enum declaration |
= |
enumname Variable { , Variable } ; |
|
Variable |
= |
identifier [ option ] |
|
Option |
= |
[ [ Length ] [, Memory ] ] | initialization |
Base enums are represented as slider bars, drop-down menus, and option buttons.
An enum is a list of literals. Before you can use an enum, you must declare it in Application Explorer.
Hundreds of enumerable types are built into the standard application. For example, the NoYes enum has two associated literals: No has the value 0, and Yes has the value 1.
To reference an enum value, enter the name of the enum, two colons, and then the name of the literal. For example, to use the literal No in the NoYes enum, enter NoYes::No.
Base enum elements in X++ are implicitly assigned sequential integers, starting from 0 by default. However, you can explicitly assign integer values to enum elements if needed. This feature ensures that each enum element corresponds to a unique numeric value, making it easier to work with these elements in your code.
To reference a base enum element's associated label in X++, you can convert the enum element to a string using the strFmt function or the enum2str function. This allows you to retrieve the user-friendly label associated with the enum element, enhancing the readability and clarity of your code.