Invalid floating point operation error Solution for Delphi Software operation

Source: Internet
Author: User

Invalid floating point operation error Solution for Delphi Software Operation

Invalid floating point operation error Solution for Delphi Software operation
This error often occurs when a webbrowser is loaded into the Web page. This error is one of the webbrowser3 bugs.
I probably don't know the reason for the specific itinerary. Basically, if the XP system is compiled, it is easy to get this error if you put it on Vista or V7. The specific solution is also very simple.
See the official solution below.
When running floating point code, such as, found in Direct, you'll often get a series of floating point exception S. Microsoft supporesses These exceptions by default, but we raise them. It's easy-to-turn this option off in both C++builder and Delphi.

Here's how to turn them off in C++builder:

#include float.h

__fastcall Tform1::tform1 (tcomponent* Owner)
: Tform (Owner)
{
_control87 (Mcw_em, Mcw_em);
}

Turn them off in Delphi:

Const
Mcw_em = DWord ($133f);
Begin
SET8087CW (MCW_EM);
End

This is the official solution, and the general meaning is to add two lines of code. The specific home where I explain.
Const
Mcw_em = DWord ($133f); This sentence is defined as a constant and is, of course, written in the place where the constants are defined.
SET8087CW (MCW_EM); This sentence is written in the form of the creation of the section will be
It's so simple.

Resolution of errors that occur invalid floating point operation on the operation of the Delphi software

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.