[fpc-pascal] Extended property can't have default value?

Joao Morais post at joaomorais.com.br
Mon Oct 6 16:14:43 CEST 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, ...

If this area is typed, and the size is 64 for the 64 bits compiler, you 
could store a pextended instead of the value itself. Just a thought.

--
Joao Morais



More information about the fpc-pascal mailing list