vbdpss.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Article Q26494, Example 1
                                                 Contents  Index  Back
─────────────────────────────────────────────────────────────────────────────
                           Knowledge Base Contents  Knowledge Base Index
 
 "Subscript Out of Range" for Array > 128K; Gaps in Far Heap, Example 1
 
 The following example shows how to work around the "Subscript out of
 range" error message:
 
 ' To try this example in VBDOS.EXE:
 ' 1. From the File menu, choose New Project.
 ' 2. Copy the code example to the Code window.
 ' 3. Press F5 to run the program.
 
 DEFINT A-Z
 TYPE test
    a   AS DOUBLE         ' 8 bytes.
    b   AS STRING * 288   ' 288 bytes.
    PAD AS STRING * 216   ' Must pad to make 512-byte total record size.
 END TYPE
 max = 453
 REM $DYNAMIC
 DIM x(1 TO max)  AS test
 END