mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 00:58:22 +02:00
27 lines
410 B
ObjectPascal
27 lines
410 B
ObjectPascal
{ %version=1.1 }
|
|
{$mode objfpc}
|
|
{$M+}
|
|
uses
|
|
typinfo;
|
|
type
|
|
tmyobject = class
|
|
protected
|
|
fs : single;
|
|
published
|
|
property s : single read fs write fs default 3.1415;
|
|
end;
|
|
|
|
var
|
|
myobject : tmyobject;
|
|
|
|
begin
|
|
myobject:=tmyobject.create;
|
|
SetFloatProp(myobject,'s',3);
|
|
if GetFloatProp(myobject,'s')<>3 then
|
|
begin
|
|
writeln('error');
|
|
halt(1);
|
|
end;
|
|
myobject.free;
|
|
end.
|