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

ID: Q72716


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for MS-DOS, version 1.0
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2, versions 7.0, 7.1


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 :
Version : MS-DOS:1.0; :7.0,7.1
Platform : MS-DOS
Issue type :


Last Reviewed: December 10, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.