BUG: Format Specifications Give Incorrect Output
Article ID: 145821
Article Last Modified on 10/2/2003
APPLIES TO
- Microsoft Visual C++ 4.0 Cross Development Edition for Macintosh
This article was previously published under Q145821
SYMPTOMS
When you use the C run-time functions such as sprintf when building a
68K Macintosh target, the format specification for long double (%ld,
%le, %lg) yields incorrect output. This is not a problem with a Power
Macintosh target.
RESOLUTION
Use other format specifications. Internally, do your calculations using
long doubles. However, when it comes time to output final results, convert
the result to a double, and use the corresponding format specification.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this problem and will
post new information here in the Microsoft Knowledge Base as it becomes
available.
Additional query words: 4.00 Windows 95 NT
Keywords: kbcrt KB145821