<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Den 04-03-2012 22:31, Zaher Dirkey skrev:
<blockquote
cite="mid:CABKDQHxaUNosQFq2-nWB3f=A40zgk=EwqPZm5YLhR8hTKC1AYA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">I found this problem in Delphi and FPC, please test
it and confirm if it is a bug.<br>
<br>
-------------------<br>
program test_abs_curr;<br>
uses<br>
sysutils;<br>
<br>
var<br>
a: Currency;<br>
begin<br>
a := 674.59;<br>
if a<>abs(-a) then<br>
writeln('not equal')<br>
else<br>
writeln('equal');<br>
<br>
end.<br>
-------------------<br clear="all">
<br>
<div dir="ltr">I am using last reversion of Lazarus, FPC 2.6<br>
<br>
Best Regards<br>
Zaher Dirkey</div>
<br>
</div>
</blockquote>
I get "not equal" for i386-win32, however with the following program
I get "equal"<br>
<br>
program test_abs_curr;<br>
uses<br>
sysutils;<br>
<br>
var<br>
a,b: currency;<br>
begin<br>
a := 674.59;<br>
b := abs(-a);<br>
if a<>b then<br>
writeln('not equal')<br>
else<br>
writeln('equal');<br>
<br>
end. <br>
</body>
</html>