tw8777d.pp 590 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. { %fail }
  2. { %norun }
  3. {$ifdef fpc}
  4. {$mode objfpc}
  5. {$endif}
  6. type
  7. TTest = class
  8. private
  9. FTest: Integer;
  10. procedure SetTest(const Value: Integer);
  11. public
  12. property Test: Integer read FTest write SetTest;
  13. end;
  14. { TTest }
  15. procedure TTest.SetTest(const Value: Integer);
  16. begin
  17. // Writeln('SetTest called!');
  18. // FTest := Value;
  19. end;
  20. var
  21. Test: TTest;
  22. f: text;
  23. begin
  24. Test := TTest.Create;
  25. {
  26. Writeln('Test.Test = ', Test.Test);
  27. Test.Test := 2;
  28. Writeln('Test.Test = ', Test.Test);
  29. }
  30. ReadLn(f,Test.Test);
  31. // Writeln('Test.Test = ', Test.Test);
  32. // ReadLn;
  33. end.