blob: 8d5427a2111451fae88c60d12e3e69fcc8c61409 (
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
|
{$mode objfpc}
uses
sysutils,typinfo;
{$M+}
type
TMyClass = class(TObject)
private
FValue: Currency;
published
property Value:Currency read FValue write FValue;
end;
var
MyClass :TMyClass;
begin
MyClass := TMyClass.Create;
SetFloatProp(MyClass, 'Value', 1);
if MyClass.Value<>1 then
halt(1);
WriteLn(CurrToStr(MyClass.Value));
MyClass.Free;
writeln('ok');
end.
|