CALLing C to Return Single-Precision Gives Incorrect Results (44137)
This article was previously published under Q44137
SYMPTOMS
From within a Basic program, invoking a Microsoft C or QuickC function
that attempts to return a single-precision number may give
unpredictable results. Returning any other numeric type from a C
function gives correct results.
To work around the problem, you can pass the single-precision number
as a parameter (whose value is set inside the C function and passed
back).
This information applies to Microsoft C Compiler versions 5.00, 5.10,
and 6.00, and to Microsoft QuickC versions 1.00, 1.01, 2.00, 2.01,
2.50, and 2.51.
STATUS
Microsoft has confirmed this to be a bug in QuickBasic versions
4.00, 4.00b, and 4.50 for MS-DOS, in Microsoft Basic Compiler versions
6.00 and 6.00b (buglist6.00, buglist6.00b) for MS-DOS and OS/2, and in
Microsoft Basic Professional Development System (PDS) versions 7.00
and 7.10 for MS-DOS and MS OS/2 (buglist7.00, buglist7.10). We are
researching this problem and will post new information here in the
Microsoft Knowledge Base as it becomes available.
Note that only certain versions of Basic link with certain versions of
C, as explained in a separate article found by searching in this
Knowledge Base for the following words:
Basic and C and QuickC and link and compatible and pass and calling
Modification Type: |
Minor |
Last Reviewed: |
1/8/2003 |
Keywords: |
KB44137 |
|