[fpc-pascal] Extended, Currency and TDateTime memory layout

Marc Weustink marc at dommelstein.net
Sun Aug 8 13:41:32 CEST 2010


Felipe Monteiro de Carvalho wrote:
> On Fri, Aug 6, 2010 at 4:52 PM, Michael Van Canneyt
> <michael at freepascal.org> wrote:
>> Strange, because tkCurrency exists ?
>>
>> A currency is a Int64, which is the currency amount multiplied by 10000.
> 
> Well, apparently Delphi 6 RTTI thinks that it is a float. Check this code:

A currency being a float type makes some sense. IIRC the Comp type was 
used to represent currency, a fixed point number with 5 decimals. This 
Comp type was defined and calculated in the numeric coprocessor (like 
all other floatingpoint types)
Therefore older versions of Delphi see this as float (iirc)

Marc




More information about the fpc-pascal mailing list