KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q42468: QB.EXE Hang or "Division by Zero" with Labeled REM $INCLUDE

Article: Q42468
Product(s): See article
Version(s): 4.00 4.00b 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist4.00 buglist4.00b buglist4.50 B_BasicCom | mspl13_basic
Last Modified: 26-FEB-1990

In the QB.EXE environment in QuickBASIC Version 4.50, a statement
consisting of a line number (or label) followed by two or more spaces
and then REM $INCLUDE: 'file', where "file" does not exist, displays a
"Binding" message and hangs your machine at compile time.

In QuickBASIC Versions 4.00 and 4.00b, attempting to compile the same
program from within the QB.EXE environment generates the error
"Division By Zero."

Microsoft has confirmed these to be problems in QuickBASIC Versions
4.00, 4.00b, and 4.50. This problem was corrected in Microsoft BASIC
Professional Development System (PDS) Version 7.00 (fixlist7.00).

If there is only one space between the line-number or label and REM
$INCLUDE, the correct error message is generated: "File Not Found."

Your machine will not hang and the correct error message will be
generated if compiled using BC.EXE.

Code Example
------------

05  '**** PROGRAM #1 ****
06  '
10  ' Compiling this program from within the environment will hang
20  ' your machine in QB 4.50 and will give "DIVISION BY ZERO ERROR"
30  ' in QB 4.00 and QB 4.00b.
40  '
50   REM $INCLUDE: 'missing'
55  ' (Two or more spaces between line-number and REM, and 'missing'
60  ' does not exist in the current directory.)

05 '**** PROGRAM #2
06 '
10 ' This program will compile and generate the expected error of
20 '  "FILE NOT FOUND"
30 '
40 REM $INCLUDE: 'missing'       --one space between line number and REM

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.