<html><body><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk><br>>> what is the meaning of this compiler define?<br>>> I am expecting, that Currency datatype is internaly stored using <br>>>Int64<br>>> datatype (*10000).<br>>> This compiler define is set for Win64, but not for Win32.<br>>> Does it means, that on Win32 there is Currency internaly represented<br>>> using another data type?<br>>><br>> <br>> Correct. On all non-Win64 x86 systems the Currency type is a FPU <br>>based type.<br></lacak@zoznam.sk></fpc-pascal@lists.freepascal.org><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk><br></lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk>x87 FPU based data types only when doing calculations inside FPU?</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk>Am I right, that in memory layout is sam
e as for Int64 on Win64 and also on Win32? When I try:</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk><br></lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk>var</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk> c: currency:</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk> i: int64 absolute c;</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk>begin</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk> // SizeOf(c) = SizeOf(i) = 8 on both Win32 and also Win64</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk> c:= <some value>;
</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk> // then in "i" is c*10000</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk> writeln(i); // prints c*10000</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk>end.</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk><br></lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk>So in memory is stored always as int64 and when CPU/FPU is working with it then is converted to extended and loaded into FPU registers - FILD. And when stored back into memory FIST is used to convert value in FPU register to signed 64bit integer and stored into memory.</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepa
scal.org><lacak@zoznam.sk>So it is safe to assume that in memory is Currency always stored as Int64 on Win32, Win64?</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk><br></lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk>Thanks</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div><div><fpc-pascal@lists.freepascal.org><lacak@zoznam.sk>-Laco.</lacak@zoznam.sk></fpc-pascal@lists.freepascal.org></div></body></html>