Wrong Number of Dimensions in Common or Dim Statement

ID: Q95863


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, version 7.1
  • Microsoft QuickBASIC for MS-DOS, version 4.5


SYMPTOMS

When you specify an array in a Common statement and later use the array with an incorrect number of dimensions, the QB.EXE and QBX.EXE environments correctly report "Wrong number of dimensions," but incorrectly indicates the position of the error as being in either the Common statement or the Dim statement for the array.


STATUS

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


MORE INFORMATION

To find the true position of the error, use the BC.EXE compiler from the MS-DOS command prompt to compile your source file and generate a compiler listing. For example:

BC /A TEST.BAS,,TEST.LST
The .LST compiler listing indicates the line that has the error.

The following code sample reproduces the problem:

   Common a()
   Dim a(9, 9)
   a(1) = 1 

Additional query words: VBmsdos QuickBas BasicCom 1.00 7.10 4.50 b_basiccom b_quickbas buglist1.00 buglist7.10 buglist4.50

Keywords :
Version : MS-DOS:1.0,4.5; :7.1
Platform : MS-DOS
Issue type :


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