ener.hlp (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.
Subscript out of range (ERR: 9)
■ An array element was referenced with a subscript that is
  outside the dimensions of the array, or an element of an
  undimensioned dynamic array has been accessed.
 
■ You may also get this error if:
  • The array size exceeds 64K.
  • The array is not dynamic.
  • The /AH option was not used.
 
■ Possible solutions:
 
  • Reduce the size of the array, make the array dynamic, and
    use the /AH command-line option.
 
  • When you use the huge /AH switch, you can declare dynamic
    fixed-length strings and numeric arrays to be greater than
    64K. However, if you are declaring a fixed-length array or
    an array of user-defined types and the size of its
    elements isn't a power of 2 (2, 4, 8, 16), a "gap" appears
    in the segment blocks. At the second occurrence of a gap,
    the expected error occurs. You can compensate by padding
    that type to become a size that is a power of 2. For
    example:
 
              TYPE MYTYPE
                   DIM A AS STRING * 10
                   DIM DUMMY AS STRING *6
              END TYPE
 
■ If you need additional help, move the cursor to a keyword
  and press F1 to open the Help window.