Q26015: "Type Mismatch" in Editor Changing Size of Array in COMMON
Article: Q26015 Product(s): See article Version(s): 4.00 Operating System(s): MS-DOS Keyword(s): ENDUSER | buglist4.00 fixlist4.00b fixlist4.50 | mspl13_basic Last Modified: 21-NOV-1988 The program below demonstrates a problem when changing the size of an array that is included in a COMMON statement. After running the program in the editor once, if the size of the array is changed, a type-mismatch error occurs on the COMMON statement. The program must be reloaded to change the size of the array. The same error occurs regardless of whether the program is run with a SHIFT+F5 or an F5. If the variable is explicitly typed, for example, DIM a%(1000), the same error occurs. The array may be set back to its original size for the error to disappear. The program is as follows: DIM a(1000) COMMON SHARED a() ' COMMON without SHARED also shows problem. Microsoft has confirmed this to be a problem in Version 4.00. This problem is corrected in QuickBASIC Versions 4.00b and 4.50.
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.