Wrong result from an explicit cast Double()
Original Reporter info from Mantis: kluug.net @onpok
-
Reporter name: Ondrej Pokorny
Original Reporter info from Mantis: kluug.net @onpok
- Reporter name: Ondrej Pokorny
Description:
When I use an explicit cast to Double, I get a wrong result.
Steps to reproduce:
Execute
procedure Test_OtherUnit(const aValue: Currency);
begin
Writeln('Test_OtherUnit');
Writeln('aValue: ', aValue); // writes correct value
Writeln('Double(): ', Double(aValue)); // writes incorrect value
end;
from a different unit. The cast returns a wrong value.
Full project is attached.
Additional information:
Interestingly, if the same code is called from the same unit, the cast works fine.
I also tested ARM Linux and there it seems to work just fine.
Mantis conversion info:
- Mantis ID: 38715
- OS: Windows
- OS Build: 10 64bit
- Build: 49132
- Platform: i386-win32
- Version: 3.3.1