BUG: Cannot ERASE Arrays in SUBs DIMmed in Main Program (78133)
The information in this article applies to:
- Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0
- Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0a
- Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0b
This article was previously published under Q78133 SYMPTOMS
Any attempt to ERASE an array from within a SUB program will generate
an "Invalid function call" error when run from the interpreter, or an
"Invalid statement ordering" error when compiled. The problem occurs
under the following conditions:
- The array is a dynamic array.
- The array is dimensioned in the main program.
- The array is passed as an argument to a SUB program or is in a
SHARED statement within the SUB program.
- The array is erased within the SUB program.
The problem does not occur in the interpreter if SHARED follows the
DIM statement for the array and the SHARED statement is removed from
the SUB.
When compiled with the "Make all arrays static" compile option, the
error "Cannot erase static array variables" is correctly generated at
compile time.
Microsoft has confirmed this to be a bug with the binary and
decimal versions of Microsoft QuickBasic versions 1.0, 1.0a and 1.0b
for the Macintosh . We are researching this problem and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
Modification Type: | Major | Last Reviewed: | 10/20/2003 |
---|
Keywords: | kbbug KB78133 |
---|
|