fpc/tests/tbs0216.pp
1999-06-01 22:23:11 +00:00

35 lines
790 B
ObjectPascal

type rec = record
a : Longint;
b : Longint;
c : Longint;
d : record
e : Longint;
f : Word;
end;
g : Longint;
end;
const r : rec = (
a : 100; b : 200; c : 300; d : (e : 20; f : 30); g : 10);
begin
with r do begin
Writeln('A : ', a);
if a<>100 then halt(1);
Writeln('B : ', b);
if b<>200 then halt(1);
Writeln('C : ', c);
if c<>300 then halt(1);
Writeln('D');
with d do begin
Writeln('E : ', e);
if e<>20 then halt(1);
Writeln('F : ', f);
if f<>30 then halt(1);
end;
Writeln('G : ', g);
if g<>10 then halt(1);
end;
end.