summaryrefslogtreecommitdiff
path: root/tests/tbs/tb0457.pp
blob: b75a9e991856c570b7ca842338c381f934648223 (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
{ %version=1.1}
{$mode objfpc}
program testa;

Type
  TA = array of Integer;

var
  A,B : TA;
  I,J : Integer;
begin
  Setlength(A,10);
  For I:=0 to 9 do
      A[I]:=I;
  B:=Copy(A,3,6);
  if High(B)<>5 then
    begin
      writeln('Error 1');
      halt(1);
    end;
  For I:=0 to High(B) do
    if b[i]<>i+3 then
      begin
        writeln('Error 2');
        halt(1);
      end;
end.