mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 12:48:16 +02:00
25 lines
399 B
ObjectPascal
25 lines
399 B
ObjectPascal
{$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.
|