Moreover:
var
c: currency;
i1: int64;
i2: int64 absolute c;
begin
c := 68719476736;
i1 := Trunc(c*1);
writeln(c,', ',i1,', ',i2);
readln;
end.
Win32 (as expected): 6.8719476736E+10, 68719476736,
68719476736
Win64 (wrong) : 6.8719476736E+10
expect 1
L.
V.
__
> Od: LacaK
> Komu: fpc-pascal@lists.freepascal.org
> Datum: 18.05.2018 07:54
> Předmět: Re: [fpc-pascal] Currency and Int64 casting
>
Linux 64-bit Lazarus 1.9.0 r57948M FPC 3.1.1 x86_64-linux-qt gives
1.00E+00 1
What is dissassemb
pascal@lists.freepascal.org
> Datum: 18.05.2018 07:54
> Předmět: Re: [fpc-pascal] Currency and Int64 casting
>
Linux 64-bit Lazarus 1.9.0 r57948M FPC 3.1.1 x86_64-linux-qt gives
1.00E+00 1
What is dissassembly for:
i:=Int64(c);?
I have for Win32:
test_curr_int64.lpr:1
.
__
Od: LacaK
Komu: fpc-pascal@lists.freepascal.org
Datum: 18.05.2018 07:54
Předmět: Re: [fpc-pascal] Currency and Int64 casting
Linux 64-bit Lazarus 1.9.0 r57948M FPC 3.1.1 x86_64-linux-qt gives
1.00E+00 1
What is dissassembly for:
i:=Int64
,%rdx
000115DC 4889152daa0300 mov %rdx,0x3aa2d(%rip)
# 0x10003c010
L.
__
> Od: LacaK
> Komu: FPC-Pascal users discussions
> Datum: 17.05.2018 13:33
> Předmět: [fpc-pascal] Currency and Int64 c
Hi,
Linux 64-bit Lazarus 1.9.0 r57948M FPC 3.1.1 x86_64-linux-qt gives
1.00E+00 1
V.__
Od: LacaK
Komu: FPC-Pascal users discussions
Datum: 17.05.2018 13:33
Předmět: [fpc-pascal] Currency and Int64 casting
Hi
Hi,
consider following program:
var
c: currency;
begin
c := 1;
writeln(c,' ',Int64(c));
readln;
end.
FPC 3.0.4
On Win32/x86 I get: 1, 1000 (what I am expecting)
On Win64/x86_64 I get: 1, 1
Is is as expected ?
Is there safe way for both platforms how to get 1000 (beside that I can
u