floating point Error

hi
i"m use deslphi3
during the debug after i"m stop at breakpoint, i"m getting Erro "floating point Error' it always happend after breakpoint. and not in a specicfic place in the code.
when i"m remove the breakpoint i have no "floating point " Error Message .
why ?
thank you
Asi
asiAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ms99Connect With a Mentor Commented:
Hi, happened to me a couple of times and I'm also using Delphi 3.
Next time close your "Call Stack" window before running your program from the IDE.

This is because the "Call Stack" displays the list of procedures with the parameters. At the moment of the breakpoint some parameters are undefined and when the "Call Stack" window try to display the value of the parameter you get the "floating point operation" message.

It doesn't mean your code is buggy. Just consider this example:

Procedure AAA;
 
  Procedure BBB(var number:extended);
  begin
{    at this moment number is undefined
and when the "Call Stack" try to display "number" you might get the "Floating point operation" message
}
    number := 0;
  end;

var
  n:extended;
begin
{
  using n at this moment might cause an exception
}
  BBB(n);
end;

If you need the "Call Stack" window then  you must initialize your variables. Like n := 0; before calling BBB;
0
 
LischkeCommented:
Oh it seems that your code is so buggy that it influences the IDE and its debugger. Additionally, the debugger in D3 (and D4 for that matter) weren't particularly stable. It happend to me that I had to kill the IDE (although it was perfectly responding) because it wasn't able to kill the process it has started which had a serious bug in it...

Ciao, Mike
0
 
sburckCommented:
From the last two questions you asked, I would try reinstalling Delphi.
0
 
rwilson032697Commented:
Make sure you are compiling with optimisation turned off and stack frames turned on.

Cheers,

Raymond.
0
 
asiAuthor Commented:
i just close the Watch list and it solve the problem
10x
Asi
0
All Courses

From novice to tech pro — start learning today.