tbs0216.pp 790 B

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