blob: cf357a04f24e4b15feae35643003bee93a57c299 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// tests writing of high()/low() of enumeration values, i.e.
// writing and reading of rtti for enums, both "dense" and
// "sparse" enumerations (different rtti is generated and
// different code used for generating and reading)
type
// "dense" unnamed enumeration
Txx = set of (_one, _two, _three);
// "sparse" unnamed enumeration
Tyy = set of (_zero := 0, _ten := 10, _twenty := 20);
// "dense" enumeration
Tx = (one,two,three);
Txxx = set of Tx;
// "sparse" enumeration
Ty = (zero := 0, ten := 10, twenty := 20);
Tyyy = set of Ty;
procedure error(number : longint);
begin
writeln('error ', number);
halt(number);
end;
var
x : txxx;
y : tyyy;
err : word;
_x : txx;
_y : tyy;
begin
writeln(low(_x));
writeln(high(_x));
writeln(low(_y));
writeln(high(_y));
writeln(low(x));
writeln(high(x));
writeln(low(y));
writeln(high(y));
end.
|