blob: d97497198134cb464e74b6258748f23fb12c3943 (
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
|
{$ifdef fpc}
{$mode delphi}
{$endif}
uses
classes, typinfo;
type
tstrtype = shortstring;
TSomeType = class (TPersistent)
private
FName: tstrtype;
procedure SetName(const AValue: tstrtype);
published
property Name: tstrtype read FName write SetName;
end;
procedure tsometype.setname(const avalue: tstrtype);
begin
fname:=avalue;
end;
var
c: tsometype;
begin
c:=tsometype.create;
SetStrProp(c,'Name','This is a test of the emergency broadcast system');
if (c.name<>'This is a test of the emergency broadcast system') then
begin
writeln('"',c.name,'"');
halt(1);
end;
if getstrprop(c,'Name')<>'This is a test of the emergency broadcast system' then
halt(2);
end.
|