BC.EXE "Internal Error" Occurs if Line Number 0 Is Used (35887)



The information in this article applies to:

  • Microsoft QuickBASIC 4.0
  • Microsoft QuickBASIC 4.0b
  • Microsoft QuickBASIC 4.5
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1

This article was previously published under Q35887

SYMPTOMS

The GOTO 0 statement in the following program runs correctly in the QB.EXE or QBX.EXE environment, but BC.EXE flags it with an "Internal error near xxx" message at compile time (where the address xxx may vary).

"An Internal Error near xxx" also occurs, if you use a line number 0 and reference it with a RESTORE statement.

"An Internal Error near xxx" also occurs, if you use line number 0 with a GOSUB statement in Microsoft QuickBasic for MS-DOS, version 4.5, and Microsoft Basic Professional Development System for MS-DOS and MS OS/2, version 7.1.

These problems occur in BC.EXE in Microsoft QuickBasic versions 4.0, 4.0b, and 4.5, in Microsoft Basic Compiler versions 6.0 and 6.0b for MS-DOS and MS OS/2 (buglist6.00, buglist6.00b), and in Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2, versions 7.0 and 7.1 (buglist7.00, buglist7.10).

Microsoft is researching these problems and will post new information here as it becomes available.

As stated on page 9 of the "Microsoft QuickBasic 4.0: Basic Language Reference" manual for versions 4.0 and 4.0b, using 0 (zero) as a line number is not recommended. (This is also stated on page 697 of the "Microsoft Basic 7.0: Programmer's Guide" for Basic PDS 7.0 and 7.1.) The error ceases if you change the line number to a number or label other than 0.

MORE INFORMATION

The following program gives an "Internal Error" from BC.EXE in all product versions mentioned above:
0 PRINT "Hello"
GOTO 0
				
The following code example gives an "Internal Error" in BC.EXE from QuickBasic versions 4.0, 4.0b, and 4.5, but works correctly in Basic PDS 7.0 and 7.1:
PRINT "Seattle Seahawks are going to the Superbowl!"
GOTO 0
PRINT "NOT PRINTED"
0 PRINT "Don't you agree?"
				
GOTO 0 appears to work correctly in Basic PDS 7.0 and 7.1 if the 0 line label occurs after the GOTO 0 statement.

The following program gives an "Internal Error" from BC.EXE in all product versions mentioned above:
0 DATA 1, 2, 3
RESTORE 0
				

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB35887