tb0183.pp 889 B

12345678910111213141516171819202122232425262728293031323334353637
  1. { Old file: tbs0216.pp }
  2. { problem with with fields as function args OK 0.99.11 (PM) }
  3. type rec = record
  4. a : Longint;
  5. b : Longint;
  6. c : Longint;
  7. d : record
  8. e : Longint;
  9. f : Word;
  10. end;
  11. g : Longint;
  12. end;
  13. const r : rec = (
  14. a : 100; b : 200; c : 300; d : (e : 20; f : 30); g : 10);
  15. begin
  16. with r do begin
  17. Writeln('A : ', a);
  18. if a<>100 then halt(1);
  19. Writeln('B : ', b);
  20. if b<>200 then halt(1);
  21. Writeln('C : ', c);
  22. if c<>300 then halt(1);
  23. Writeln('D');
  24. with d do begin
  25. Writeln('E : ', e);
  26. if e<>20 then halt(1);
  27. Writeln('F : ', f);
  28. if f<>30 then halt(1);
  29. end;
  30. Writeln('G : ', g);
  31. if g<>10 then halt(1);
  32. end;
  33. end.