Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/35887

From BetaArchive Wiki
Knowledge Base


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

Article ID: 35887

Article Last Modified on 8/16/2005



APPLIES TO

  • Microsoft QuickBasic 4.0
  • Microsoft QuickBASIC 4.0b
  • Microsoft QuickBasic 4.5 for MS-DOS
  • Microsoft BASIC Compiler 6.0
  • Microsoft BASIC Compiler 6.0b
  • Microsoft BASIC Professional Development System 7.0
  • Microsoft BASIC Professional Development System 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
                


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

Keywords: KB35887