Microsoft KB Archive/62266

= QB.EXE/QBX.EXE Incorrectly Allows GO As a Variable =

Article ID: 62266

Article Last Modified on 11/21/2006



This article was previously published under Q62266



SYMPTOMS
The QB.EXE and QBX.EXE environments incorrectly allow the keyword GO to be used as a variable. The BC.EXE compiler correctly flags this usage as a syntax error.



STATUS
Microsoft has confirmed this to be a bug in the QB.EXE environment in Microsoft QuickBasic versions 4.00, 4.00b, and 4.50; in Microsoft Basic Compiler versions 6.00 and 6.00b for MS-DOS (buglist6.00, buglist6.00b); and in the QBX.EXE environment in Microsoft Basic Professional Development System (PDS) version 7.00 for MS-DOS (buglist7.00). This problem is corrected in Microsoft Basic PDS 7.10 (fixlist7.10).



MORE INFORMATION
This error is not trapped in the QB.EXE/QBX.EXE environments because GO is not a keyword on its own. GO must always be used with the keywords TO or SUB to complete the combined phrases GOTO and GOSUB. Because QB.EXE and QBX.EXE both format the code as it is entered, &quot;GO TO&quot; is changed to be &quot;GOTO&quot;. Thus, GO on its own is not checked during QBX.EXE's final pass in creating the internal pseudocode (pcode).

The following code example fails to give an error in the QB.EXE and QBX.EXE environments, but correctly causes a &quot;Syntax error&quot; when compiled with BC.EXE: GO = 1

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

Keywords: KB62266

-

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

© Microsoft Corporation. All rights reserved.