Microsoft KB Archive/36028

= .EXE &quot;String Space Corrupt&quot; Actually Is &quot;Duplicate Definition&quot; =

Article ID: 36028

Article Last Modified on 11/21/2006



This article was previously published under Q36028



SYMPTOMS
In the program below, the QuickBasic QB.EXE environment correctly gives a &quot;Duplicate Definition&quot; error message, but the BC.EXE command-line compiler does not give the error. This may cause run-time problems in the .EXE program, such as hanging or &quot;string space corrupt&quot; error messages.



STATUS
Microsoft has confirmed this to be a bug in QuickBasic Versions 4.00, 4.00b, and 4.50, and in Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2 (buglist6.00, buglist6.00b). This problem was corrected in Microsoft Basic PDS Version 7.00 (fixlist7.00).

To work around this problem, you can run the program in the QB.EXE environment to check for errors that the BC.EXE compiler misses.



MORE INFORMATION
The problem occurs in the .EXE regardless of whether or not you compile with the BC /D (debug) option.

The following is a code example: DEFINT A-Z DECLARE SUB TestRoutine TYPE XDef Area AS STRING * 10 END TYPE COMMON SHARED /XYZ/ X AS XDef X.Area = &quot;1234567890&quot; TestRoutine PRINT X.Area END

SUB TestRoutine STATIC DIM X AS STRING       ' &quot;Duplicate Definition&quot; in QB.EXE editor. X = &quot;abcdefghi&quot;       ' &quot;String Space Corrupt&quot; error here in .EXE END SUB

Additional query words: QuickBas BasicCom buglist4.00 buglist4.00b buglist4.50 B_BasicCom

Keywords: KB36028

-

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

© Microsoft Corporation. All rights reserved.