Are comparisons not working right in 6?
Hi,
I am in Delphi 5 and RB 6.03 and I have a code that
read:
var
age: integer;
...
age:=mycalc(x);
if age=-1 then
a1:=a1+1
else if (i>-1) and (i<18) then
a2:=a2+1
else if (i>=18) then
a3:=a3+1;
...
This does not have any in a2. Changing the
code to:
var
age: integer;
...
age:=mycalc(x);
if age<0 then <====chnaged
a1:=a1+1
else if (i>=0) and (i<18) then <=========changed
a2:=a2+1
else if (i>=18) then
a3:=a3+1;
...
does count it in a2 correctly
Has this been seen before? Is it fixed in 7?
Thanks,
Joseph Gordon
I am in Delphi 5 and RB 6.03 and I have a code that
read:
var
age: integer;
...
age:=mycalc(x);
if age=-1 then
a1:=a1+1
else if (i>-1) and (i<18) then
a2:=a2+1
else if (i>=18) then
a3:=a3+1;
...
This does not have any in a2. Changing the
code to:
var
age: integer;
...
age:=mycalc(x);
if age<0 then <====chnaged
a1:=a1+1
else if (i>=0) and (i<18) then <=========changed
a2:=a2+1
else if (i>=18) then
a3:=a3+1;
...
does count it in a2 correctly
Has this been seen before? Is it fixed in 7?
Thanks,
Joseph Gordon
This discussion has been closed.
Comments
comparisons usually fail because of precision differences on the decimal.
Can you send us a simple example report with RAP code that shows the problem
to support@digital-metaphors.com and we'll test it.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com