Microsoft KB Archive/42468

= QB.EXE Hang or &quot;Division by Zero&quot; with Labeled REM $INCLUDE =

Article ID: 42468

Article Last Modified on 11/21/2006



This article was previously published under Q42468



SYMPTOMS
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 &quot;file&quot; does not exist, displays a &quot;Binding&quot; 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 &quot;Division By Zero.&quot;

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).



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

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 &quot;DIVISION BY ZERO ERROR&quot; 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 ' &quot;FILE NOT FOUND&quot; 30 ' 40 REM $INCLUDE: 'missing'      --one space between line number and REM

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

Keywords: KB42468

-

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

© Microsoft Corporation. All rights reserved.