Microsoft KB Archive/42468

From BetaArchive Wiki
Knowledge Base


QB.EXE Hang or "Division by Zero" 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 "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).

MORE INFORMATION

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
                


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

Keywords: KB42468