Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 90
89 Enumeration Clause
constant-name
is the name of a constant in the open DDL dictionary. The constant value must
be a valid
display-string
value.
LN clause
specifies the locale associated with a value.
DDL ignores the AS clause when generating host-language source code.
Enumeration Clause Guidelines
The following points are guidelines for using the enumeration clause:
•
A single-field definition that has one or more level 89 clauses must also have
BEGIN before the first period and END after the last clause.
•
One or more level 89 clauses can follow the definition attribute clauses in a field
definition or description. Level 89 clauses cannot directly follow a group definition
or description.
•
For C, the level 89 enumeration clauses for a field of type ENUM are translated
into literals included in a C enumeration type. If the type of a single-field definition
is ENUM, DDL generates a
typedef
enum
. If the type of a field in a group
definition is ENUM, DDL generates an
enum
embedded in a
typedef
:
enum
{
value-name1 = enumeration-value1,
value-name2 = enumeration-value2,
...
};
typedef short def-name_def;
If the type of a field in a group definition is ENUM, DDL generates a separate
enumeration outside a
typedef
struct
:
enum
{
value-name1 = enumeration-value1,
value-name2 = enumeration-value2,
...
};
typedef struct __group-name
{
char first-element;
short enumeration-element
} group-name_def;
Because the C compiler is case sensitive, DDL generates all lowercase letters for
C source code.
Содержание DDL D40
Страница 36: ...Introduction to DDL Data Definition Language DDL Reference Manual 426798 002 1 14 Examining a Dictionary ...
Страница 66: ...Named Constants Data Definition Language DDL Reference Manual 426798 002 4 10 Standard SPI Constants ...
Страница 230: ...Dictionary Manipulation Statements Data Definition Language DDL Reference Manual 426798 002 8 14 SHOW USE OF Statement ...
Страница 370: ...Dictionary Maintenance Data Definition Language DDL Reference Manual 426798 002 10 24 Converting a Dictionary ...
Страница 456: ...Sample Schemas Data Definition Language DDL Reference Manual 426798 002 B 12 ASSNDDL Statements ...
Страница 470: ...DDL Data Translation Data Definition Language DDL Reference Manual 426798 002 C 14 ...
Страница 528: ...Dictionary Reports Data Definition Language DDL Reference Manual 426798 002 E 8 Requesting Reports ...
Страница 552: ...DDL Alignment Rules Data Definition Language DDL Reference Manual 426798 002 H 4 FIELDALIGN_SHARED8 Alignment Rules ...
Страница 576: ...Index Data Definition Language DDL Reference Manual 426798 002 Index 22 Special Characters ...