Board index » delphi » Confused "Invalid Floating Point operation"

Confused "Invalid Floating Point operation"

Hey all...

OK OK.... this is a Delphi 3 vs Delphi 4 prob....cause this section of
code works in delphi 3, but when i load up the exact same thing in
delphi 4 it gives me a invalid floating point operation, the question is
why? did i code it wrong...and it just worked in DP 3 or no? is there a
fix? HELP....

private
        ltlarray : array [0..10] of single;
-----------------------------------------------
if dmBaseData.tbltlrates['Min'] <> null then
    ltlarray[0] := dmBaseData.tbltlrates['Min'];

   if dmBaseData.tbltlrates['R1'] <> null then
    ltlarray[1] := dmBaseData.tbltlrates['R1'] / 100;
  if dmBaseData.tbltlrates['R2'] <> null then
   ltlarray[2] := dmBaseData.tbltlrates['R2'] / 100 ;

In Min is a decimal point number  85.55 which i want to store in a
array....but when i try it crashes....if i use Whole Numbers nooooo
prob......
i tried Longint and Real as array types but no Luck.....any guesses out
there HELP ME....

thanks in advance

I.S

 

Re:Confused "Invalid Floating Point operation"


Quote
> Hey all...

> OK OK.... this is a Delphi 3 vs Delphi 4 prob....cause this section of
> code works in delphi 3, but when i load up the exact same thing in
> delphi 4 it gives me a invalid floating point operation, the question is
> why? did i code it wrong...and it just worked in DP 3 or no? is there a
> fix? HELP....

> private
>         ltlarray : array [0..10] of single;
> -----------------------------------------------
> if dmBaseData.tbltlrates['Min'] <> null then
>     ltlarray[0] := dmBaseData.tbltlrates['Min'];

>    if dmBaseData.tbltlrates['R1'] <> null then
>     ltlarray[1] := dmBaseData.tbltlrates['R1'] / 100;
>   if dmBaseData.tbltlrates['R2'] <> null then
>    ltlarray[2] := dmBaseData.tbltlrates['R2'] / 100 ;

> In Min is a decimal point number  85.55 which i want to store in a
> array....but when i try it crashes....if i use Whole Numbers nooooo
> prob......
> i tried Longint and Real as array types but no Luck.....any guesses out
> there HELP ME....

> thanks in advance

> I.S

Other Threads