[fpc-pascal] Extended property can't have default value?
Michael Van Canneyt
michael at freepascal.org
Mon Oct 6 16:13:38 CEST 2008
On Mon, 6 Oct 2008, Jonas Maebe wrote:
>
> On 06 Oct 2008, at 12:48, Graeme Geldenhuys wrote:
>
> >Why is the following not allowed in a class declaration?
> >
> > property Increment: extended read FIncrement write SetIncrement default
> > 1.0;
>
> Because default values are stored in a 32 bit location inside the compiler. I
> have no idea what the reason for this is, how Delphi does this and what it
> allows, whether this not only a matter of the compiler but also of the rtti,
> ...
FPC is 100% Delphi compatible as FPC. Default values for sets are also only allowed
for sets that fit in 32-bits. We can change this, but that would require quite some
work in the RTTI structures.
Michael.
More information about the fpc-pascal
mailing list