<div dir="ltr"><br><br><div class="gmail_quote">On Sat, Aug 7, 2010 at 9:56 PM, Felipe Monteiro de Carvalho <span dir="ltr"><<a href="mailto:felipemonteiro.carvalho@gmail.com">felipemonteiro.carvalho@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">> A currency is a Int64, which is the currency amount multiplied by 10000.<br>
<br>
</div>Well, apparently Delphi 6 RTTI thinks that it is a float. Check this code:<br>
<br>
471 else if ElmTypeInfo.Kind in [tkFloat] then begin<br>
472 case TypeData.FloatType of<br>
473 ftSingle: Stream.Write(DynArray^, ArrayLength *<br>
SizeOf(Single));<br>
474 ftDouble: Stream.Write(DynArray^, ArrayLength *<br>
SizeOf(Double));<br>
475 ftComp: Stream.Write(DynArray^, ArrayLength * SizeOf(Comp));<br>
476 ftCurr: Stream.Write(DynArray^, ArrayLength *<br>
SizeOf(Currency));<br>
477 ftExtended: Stream.Write(DynArray^, ArrayLength *<br>
SizeOF(Extended));<br>
478 end;<br>
</blockquote></div><br>A Currency is a Int64 not float, if you assign currency to float variable (double/extended) and return back to currency variable, you will not get the same value.<br clear="all">Typecast the currency as Int64, assign it to int64 variable and vise versa you will not lose any thing.<br>
<br>Best regards<br>-- <br>Zaher Dirkey<br>
</div>