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