tpushpop2.pp 376 B

123456789101112131415161718192021222324252627
  1. program tpushpop2;
  2. type
  3. {$PackRecords 1}
  4. TTest1 = record
  5. b: Byte;
  6. l: LongInt;
  7. end;
  8. {$Push}
  9. {$PackRecords 4}
  10. TTest2 = record
  11. b: Byte;
  12. l: LongInt;
  13. end;
  14. {$Pop}
  15. TTest3 = record
  16. b: Byte;
  17. l: LongInt;
  18. end;
  19. begin
  20. if SizeOf(TTest1) <> SizeOf(TTest3) then
  21. Halt(1);
  22. if SizeOf(TTest1) = SizeOf(TTest2) then
  23. Halt(2);
  24. Writeln('ok');
  25. end.