blob: ac91913e79948ef455e7f79e5a0625bc1f8bdbfd (
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
|
{ %NORUN }
{$mode objfpc}
{$modeswitch advancedrecords}
{
testing range checking for arrays and for-loops
}
program tgenconst17;
type
generic TStaticList<T; const Length: SizeUInt> = record
Values: array[0..Length - 1] of T;
procedure Display;
end;
procedure TStaticList.Display;
var
I, n: SizeUInt;
begin
for I := 0 to Length - 1 do
WriteLn(Values[I]);
end;
var
list: specialize TStaticList<Integer, 20>;
begin
end.
|