Microsoft KB Archive/30313

= BC.EXE &quot;Syntax Error&quot; Instead of CONST &quot;Duplicate Definition&quot; =

Article ID: 30313

Article Last Modified on 11/21/2006



This article was previously published under Q30313



SYMPTOMS
You will receive the message &quot;Syntax Error&quot; instead of &quot;Duplicate Definition&quot; if you use the same name for a CONST and a variable when using BC.EXE.



STATUS
Microsoft has confirmed this to be a bug in QuickBasic versions 4.00, 4.00b, and 4.50; in Microsoft Basic Compiler versions 6.00 and 6.00b for MS- DOS and MS OS/2; and in Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS-DOS and MS OS/2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
When the following sample program is run inside the QB.EXE or QBX.EXE editor, you receive the expected &quot;Duplicate Definition&quot; error on the CONST statement. The same line produces a &quot;Syntax Error&quot; message when compiled using BC.EXE.

QuickBasic version 3.00 produces the error message &quot;Constant assignment illegal&quot; when compiled inside the QB.EXE editor or from the DOS command line.

The following sample program demonstrates the inconsistent error message: 'If this is compiled in the editor you get a &quot;Duplicate Definition&quot; 'If this is compiled with BC.EXE you get a &quot;Syntax Error&quot; a = 5 CONST a = 6

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

Keywords: KB30313

-

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

© Microsoft Corporation. All rights reserved.