Q62266: QB.EXE/QBX.EXE Incorrectly Allows GO As a Variable
Article: Q62266
Product(s): See article
Version(s): 4.00 4.00b 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | B_BasicCom buglist4.00 buglist4.00b buglist4.50 | mspl13_basic
Last Modified: 2-JAN-1991
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.
Microsoft has confirmed this to be a problem 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).
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, "GO
TO" is changed to be "GOTO". 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 "Syntax error" when
compiled with BC.EXE:
GO = 1
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.