Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 96
89 Enumeration Clause
pTAL and TAL Output. The following shows how DDL translates definitions and
descriptions of enumeration clauses into TAL source code:
DDL Type
pTAL or TAL Type
DEF status TYPE ENUM BEGIN.
89 no-error.
89 read-error.
89 write-error VALUE 6.
89 status-error.
END.
LITERAL NO^ERROR = 0,
READ^ERROR = 1,
WRITE^ERROR = 6,
STATUS^ERROR = 7;
INT STATUS;
DEF old-status TYPE status
VALUE no-error.
DEF cpu.
2 state TYPE ENUM.
89 stop.
89 pause.
89 running.
END.
INT OLD^STATUS^DEF;
Value is NO^ERROR
LITERAL STOP = 0,
PAUSE = 1,
RUNNING = 2;
STRUCT CPU^DEF (*) FIELDALIGN (SHARED2);
BEGIN
INT STATE;
END;
DEF system-state.
2 cpu0 TYPE cpu.
2 cpu1 TYPE cpu.
END.
STRUCT SYSTEM^STATE^DEF(*) FIELDALIGN
(SHARED2);
BEGIN
STRUCT CPU0;
END.
BEGIN
INT STATE;
END;
STRUCT CPU1;
BEGIN
INT STATE;
END;
END;