DDL Compiler Commands
Data Definition Language (DDL) Reference Manual — 426798-002
9- 56
EXPANDC Command
EXPANDC Command
The EXPANDC command enables inline expansion of C language output
.
EXPANDC
directs the DDL compiler to output a referenced type definition inline instead of as
a structure name.
NOEXPANDC
directs the DDL compiler to output a referenced type definition as a structure
name.
EXPANDC Command Guidelines
The following points are guidelines for using the EXPANDC command:
•
A referenced definition type is a type of a line item and is a definition defined prior
to the line item that references it.
•
In C applications, a structure being referenced by a line item is not always in the
same module. Further, the structure being referenced could refer to yet another
structure that might be in another module. Without inline expansion, a dependency
chain or modules must be developed to ensure proper resolution of references.
•
The EXPANDC command does not apply to type ENUM, because the C compiler
requires each enumerator to be unique. For ENUM types, DDL outputs a
referenced type definition as a structure name. DDL generates a C enumerator for
each 89-level clause in a type ENUM definition.
EXPANDC Command Examples
The following examples show C output for DDL definitions using the EXPANDC and
NOEXPANDC commands.
{ EXPANDC | NOEXPANDC }
DDL Definition
C Output With ?NOEXPANDC
C Output With ?EXPANDC
def a pic x (10).
t
ypedef char a_def[10];
#pragma fieldalign shared2 __b
same as ?NOEXPANDC
def b.
2 b1 type binary.
2 b2 pic x(10).
2 b3 occurs 5 times.
3 b31 type binary.
3 b32 pic x(10).
end
typedef struct __b
{
short b1;
char b2[10];
struct
{
short b31;
char b32[10];
} b3[5];
} b_def;
same as ?NOEXPANDC
Содержание 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 ...