Microsoft KB Archive/72716

= BUG: Syntax Err w/ UBOUND Causes Hang w/ R6000 Stack Overflow =

Article ID: 72716

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft Visual Basic for MS-DOS
 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q72716



SYMPTOMS
When compiling with BC.EXE from outside the VBDOS.EXE or QBX.EXE environment, a syntax error within the UBOUND statement can cause the compiler to continuously display the following error message:

Run-time error R6000

-stack overflow

Your computer may hang (stop responding to input) unless you press CTRL+BREAK immediately.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Note that this is not a problem with Microsoft QuickBasic version 4.5 for MS-DOS.



MORE INFORMATION
The following code example demonstrates the problem: 'test.bas DECLARE SUB mysub TYPE mytype a AS STRING * 5 END TYPE DIM bar(10) AS mytype COMMON SHARED bar AS mytype

SUB mysub FOR i% = 0 TO UBOUND(bar)  ' <-- Syntax error here. PRINT i%                     ' Remove the  after bar NEXT                         ' to correct the error. END SUB When compiled from the BC command line (BC test;), the BC.EXE compiler will correctly identify the syntax error but then continuously display the stack overflow error. The BC.EXE compiler included with Microsoft Visual Basic for MS-DOS displays the following two error messages and then ends:

Run-time error R6000 -stack overflow

Run-time error R6001 -Null Pointer Assignment

Additional query words: VBmsdos buglist1.00 buglist7.00 buglist7.10 1.00 7.10 7.00

Keywords: kbbug KB72716

-

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

© Microsoft Corporation. All rights reserved.