Real x Currency multiplication is not correct
Original Reporter info from Mantis: yuyubr84
-
Reporter name: Yuri Bruxel
Original Reporter info from Mantis: yuyubr84
- Reporter name: Yuri Bruxel
Description:
When multiplicating two variables, a real and a currency, the returned result is not correct.
Steps to reproduce:
On a form, places a TButton with the following code:
----------------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
var a : real;
b : currency;
begin
a := 1.1;
b := 10;
b := a*b+1;
showmessage(currtostr(b));
end;
-----------------------
The expected display value for "b" would be "12", but it shows "110001".
Additional information:
On Delphi it works as expected.
It also works on Linux (result is 12).
This bug occurs also on Windows 10.
Mantis conversion info:
- Mantis ID: 30483
- OS: Windows 7 64-bit Service Pack 1
- Build: SVN 51630
- Version: 3.0.0