FIX: IDE Debugger Truncates Floating Point Numbers (155622)
The information in this article applies to:
- The Integrated Debugger, when used with:
- Microsoft Visual C++, 32-bit Learning Edition 4.0
- Microsoft Visual C++, 32-bit Learning Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.0
- Microsoft Visual C++, 32-bit Professional Edition 4.1
- Microsoft Visual C++, 32-bit Professional Edition 4.2
This article was previously published under Q155622 SYMPTOMS
If you change the Language Settings under the operating system to a
language that uses a comma as the decimal separator, recalculating any
floating point numbers in the QuickWatch window in the integrated debugger
truncates the floating point number. Thereafter, incorrect results may be
generated from program execution. To reproduce the problem, please see
the "More Information" section below.
The following language settings may cause this problem.
German Italian Portuguese Swedish Norwegian
Indonesian Icelandic French Finnish Dutch
Danish Catalan Basque
RESOLUTION
To work around the problem, use one of the following suggestions:
- In the QuickWatch window, cast the variable you plan to watch to the
proper type. For example, if you plan to watch variable "a" in the
following program, because "a" is defined as type double, cast it to a
double in the QuickWatch window. That is, type "(double)a" (without the
quotation marks) in the QuickWatch window.
-or-
- In the QuickWatch window, add zero to the variable. For example, in the following program, type "a+0" (without the quotation marks) in the
QuickWatch window to watch variable "a".
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug was corrected in Visual C++
version 5.0.
Modification Type: | Major | Last Reviewed: | 12/10/2003 |
---|
Keywords: | kbBug kbDebug kbfix kbide kbProgramming kbVC500fix KB155622 |
---|
|