Microsoft KB Archive/71259

= PDS 7.1 and C 6.0 with C Cast of Float Causes Program Hang =

Article ID: 71259

Article Last Modified on 11/21/2006



This article was previously published under Q71259



SYMPTOMS
Performing type casting of a floating-point type in a Microsoft C version 6.0 or a QuickC version 2.5 routine called from a Microsoft Basic Professional Development System (PDS) version 7.1 program that uses the Basic emulator math run-time module (BRT71Exx) will cause the program to hang or display incorrect (bad) numeric results at run time.

If the Basic program is compiled as a stand-alone program (using BCL71Exx.LIB), or if both the Basic and C modules are compiled to use the alternate math package (using the /FPa compile option), the problem will not occur.



STATUS
Microsoft has confirmed this to be a bug in Microsoft Basic Professional Development System version 7.1 for MS-DOS and OS/2. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
The following sample program demonstrates the problem:

CPROG.C
int castit(double d) { return ((int) d); }

BPROG.BAS
DECLARE FUNCTION castit CDECL (BYVAL D#) PRINT castit(5.3#) END Compile and link as follows: CL /c /AM CPROG.C ; BC BPROG.BAS ; LINK /NOE /NOD BPROG CPROG,,,BRT71ENR MLIBCE ;

Additional query words: BasicCom buglist7.10 7.10 2.50 2.51 6.00

Keywords: KB71259

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.