summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0369.pp
blob: a487584fa2a150a05fadabd152f56e543ef6037b (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

type
  ptchar=^tchar;
  tchar=packed record
    c : char;
  end;

function inl(l:ptchar):ptchar;
begin
  inc(l);
  inl:=l;
end;

var
  i : longint;
  j : ptchar;
  s : string;
  error : boolean;
begin
  error:=false;
  s:='012345789';
  j:=@s[1];
  for i:=1to 8 do
   begin
     writeln(inl(j)^.c);
     If (inl(j)^.c<>s[i+1]) Then
      error:=true;
     inc(j);
   end;
  if error then
   begin
     writeln('Error!');
     halt(1);
   end;
end.