[next] [previous] [contents]

  14.6.2 Creating Virtual Array Files
  BASIC virtual arrays let you define arrays that reside on
  disk. You use them just as you would an ordinary array.
  You create a virtual array by dimensioning an array with
  the DIM # statement, then opening a VIRTUAL file on that
  channel. You access virtual arrays just as you do normal
  arrays.

  The following DIM # statement dimensions a virtual array
  on channel #1. The OPEN statement opens a virtual file that
  contains the array. The last program line assigns a value to
  one array element.
  DIM #1%, LONG Int_array(10,10,10)
      .
      .
      .

  OPEN "VIRT.DAT" FOR OUTPUT AS FILE #1%, VIRTUAL
      .
      .
      .

  Int_array(5,5,5) = 100%

  Note that you cannot redimension virtual arrays with an ex-
  ecutable DIM statement. See
Chapter 7 for more information
  about virtual arrays.