Den 04-03-2012 22:31, Zaher Dirkey skrev:
I found this problem in Delphi and FPC, please test it and confirm if
it is a bug.
-------------------
program test_abs_curr;
uses
sysutils;
var
a: Currency;
begin
a := 674.59;
if a<>abs(-a) then
writeln('not equal')
else
writeln('equal');
end.
-------------------
I am using last reversion of Lazarus, FPC 2.6
Best Regards
Zaher Dirkey
I get "not equal" for i386-win32, however with the following program I
get "equal"
program test_abs_curr;
uses
sysutils;
var
a,b: currency;
begin
a := 674.59;
b := abs(-a);
if a<>b then
writeln('not equal')
else
writeln('equal');
end.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal