Article ID: 41153
Article Last Modified on 11/21/2006
This article was previously published under Q41153
SYMPTOMS
In the QB.EXE environment, if you REDIM an array of any type (which had been previously DIMensioned using an AS clause) without re-specifying the type with the AS clause, the error is not reported. The error is correctly reported when the program is compiled using BC.EXE.
STATUS
Microsoft has confirmed this to be a bug in Version 4.50. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
The program example below demonstrates the problem. When run as shown below inside the QuickBasic environment, the program executes without error. However, if it is compiled using BC.EXE, the error message "AS clause required" is generated. This error message also properly displays if the program is run inside the QuickBasic Version 4.00 or 4.00b environment.
The following is a code example:
TYPE Test a AS STRING * 40 b AS STRING * 40 END TYPE REDIM a(1 TO 100) AS Test PRINT LBOUND(a), UBOUND(a), LEN(a(LBOUND(a))) REDIM a(20 TO 50) 'This line contains the error PRINT LBOUND(a), UBOUND(a), LEN(a(LBOUND(a)))
Additional query words: QuickBas buglist4.50
Keywords: KB41153