BUG: Cannot Use a Constant to Define the Size of Array in VBCE

ID: Q215401


The information in this article applies to:
  • Microsoft Windows CE Toolkit for Visual Basic 6.0, version 1.0
  • Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0


SYMPTOMS

When you attempt to use a defined constant as the size of an array, the following compile error results:

Compile Error: Expected integer constant


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Windows CE HPC, HPC Pro, or PsPC Project in Visual Basic. Form1 is created by default.


  2. Paste the following code into Form1:


  3. 
        Const cbFormatsNum = 14
        Dim cbFormats(cbFormatsNum) 
  4. Run the project.


The error message mentioned in the "Symptoms" section occurs.

Additional query words: vbce vbce6 wce

Keywords : kbToolkit kbVBp500bug kbVBp600bug kbWinCE kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug


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