1Enum DEFINITIONS IMPLICIT TAGS ::=
2BEGIN
3-- EXPORTS P1, P2;
4
5-- F.2.3.1
6-- Use an enumerated type to model the values of a variable
7-- with three or more states.
8-- Assign values starting with zero if their only
9-- constraint is distinctness.
10-- EXAMPLE
11
12DayOfTheWeek ::= ENUMERATED {sunday(0), monday(1), tuesday(2),
13			wednesday(3), thursday(4), friday(5), saturday(6)}
14
15firstDay DayOfTheWeek ::= sunday
16
17-- F.2.3.2
18-- Use an enumerated type to model the values of a variable that
19-- has just two states now,
20-- but that may have additional states in a future version of the protocol.
21-- EXAMPLE
22
23MaritalStatus ::= ENUMERATED {single(0), married(1)}
24
25-- in anticipation of
26
27MaritalStatus2 ::= ENUMERATED {single(0), married(1), widowed(2)}
28
29
30E1 ::= ENUMERATED {blue,green,yellow}
31
32E2 ::= ENUMERATED {monday(0),thuesday(1),wednesday(2),thursday(3),friday(4)}
33
34E3 ::= ENUMERATED {monday,thuesday(0)}
35
36S ::= SEQUENCE {
37	e1 ENUMERATED {hej,hopp},
38	e2 [2] EXPLICIT ENUMERATED {san,sa}
39	}
40
41enumVal E3 ::= monday
42--enumWrongVal E3 ::= sunday
43
44END
45
46
47