Data Definition Language (DDL) Reference Manual
Definition Attributes
Data Definition Language (DDL) Reference Manual—529431-004
6-87
89 Enumeration
For TACL, the level-89 enumeration clauses for a field of type ENUM are translated to 
SECTION directives of type TEXT followed by an ENUM for the item with which the 
level-89 clauses are associated:
?Section ENUMERATION-NAME1 Text
 ENUMERATION-VALUE1
?Section ENUMERATION-NAME2 Text
 ENUMERATION-VALUE2
 ...
?Section DEF-NAME Struct
 Begin
 ENUM DEF-NAME;
 End;
Example 6-71. Enumeration Clause Output for C
DDL Type C Type
DEF status TYPE ENUM BEGIN.
 89 no-error.
 89 read-error.
 89 write-error VALUE 6.
END.
#pragma section status
enum
 {
 no_error = 0,
 read_error = 1,
 write_error = 6
 };
typedef short status_def;
DEF old-status TYPE status
 VALUE no-error.
typedef status_def old_status_def;
/*value is no_error*/
DEF cpu.
 2 state TYPE ENUM.
 89 stop.
 89 pause.
 89 running.
END.
#pragma section cpu
 enum
 {
 stop = 0,
 pause = 1,
 running = 2
 };
#pragma fieldalign shared2 __cpu
typedef struct __cpu
 {
 short state;
 } cpu_def;
DEF system-state.
 2 cpu0 TYPE cpu.
 2 cpu1 TYPE cpu.
END.
#pragma section system state
#pragma fieldalign shared2 __system_state
typedef struct __system_state
 {
 cpu_def cpu0;
 cpu_def cpu1;
 } system_state_def;










