Microsoft KB Archive/42476

= &quot;Subscript Out of Range&quot; Then Add REM $DYNAMIC Hangs QB 4.50 =

Article ID: 42476

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 4.5 for MS-DOS

-



This article was previously published under Q42476



SYMPTOMS
The following series of actions hang the QuickBasic 4.50 editor when dimensioning a $DYNAMIC huge array:

 Start QB with the /AH switch.  Dimension a STATIC array larger than 64K of any type of data except variable length strings, as follows: 'example code. Do not use the metacommand yet. DIM ARRAY1(32000) AS SINGLE ' 128000 bytes  Run the program (press SHIFT+F5). This produces the error &quot;Subscript out of range,&quot; as expected. Add REM $DYNAMIC before the DIMension. Run the program (press SHIFT+F5). The machine usually hangs at this point. Occasionally, it produces the error message &quot;String Space Corrupt&quot; and returns to the DOS prompt.

This problem does not occur in the QuickBasic Versions 3.00, 4.00, or 4.00b editors and does not apply to .EXE applications compiled with BC.EXE in 4.50.



STATUS
Microsoft has confirmed this to be a bug in Microsoft QuickBasic Version 4.50. The problem was corrected in Microsoft Basic Professional Development System (PDS) Version 7.00 (fixlist7.00). When the program is run a second time, it does not hang or produce an error message.

Additional query words: QuickBas SR# S890228-60 buglist4.50

Keywords: KB42476

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.