"Subscript Out of Range" Then Add REM $DYNAMIC Hangs QB 4.50 (42476)



The information in this article applies to:

  • Microsoft QuickBASIC 4.5

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:

  1. Start QB with the /AH switch.
  2. 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
  3. Run the program (press SHIFT+F5). This produces the error "Subscript out of range," as expected.
  4. Add REM $DYNAMIC before the DIMension.
  5. Run the program (press SHIFT+F5). The machine usually hangs at this point. Occasionally, it produces the error message "String Space Corrupt" 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.

Modification Type:MinorLast Reviewed:1/9/2003
Keywords:KB42476 kbAudDeveloper