Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 94
89 Enumeration Clause
Pascal Output. The following shows how DDL translates definitions and descriptions
of enumeration clauses into Pascal source code:
DDL Type
Pascal Type
DEF status TYPE ENUM BEGIN.
89 no-error.
89 read-error VALUE 3.
89 write-error.
END.
DEF old-status TYPE status
VALUE no-error.
DEF cpu.
2 state TYPE ENUM.
89 stop.
89 pause.
89 running VALUE 4.
END.
DEF system-state.
2 cpu0 TYPE cpu.
2 cpu1 TYPE cpu.
END.
CONST NO_ERROR = 0;
CONST READ_ERROR = 3;
CONST WRITE_ERROR = 4;
TYPE STATUS_DEF = INT16;
TYPE OLD_STATUS_DEF = STATUS_DEF;
CONST STOP = 0;
CONST PAUSE = 1;
CONST RUNNING = 4;
TYPE CPU_DEF = RECORD
STATE : INT16;
END;
TYPE SYSTEM_STATE_DEF = RECORD
CPU0 : CPU_DEF;
CPU1 : CPU_DEF;
END;