blob: 82a3130689646cebb162aa3d714728fd2708ec22 (
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
|
{ %version=1.1 }
{$ifdef fpc}{$mode objfpc}{$endif}
var
err : boolean;
procedure Demo(x:array of longint);
var
i:longint;
begin
if high(x)<>4 then
err:=true
else if x[4]<>14 then
err:=true;
for i:=low(x)to high(x)do
writeln(i,' ',x[i]);
end;
var
y:array[10..40]of longint;
i:longint;
begin
for i:=10 to 40 do
y[i]:=i;
Demo(slice(y,5));
if err then
begin
writeln('ERROR!');
halt(1);
end;
end.
|