How do I declare an array when I don't know the length until run time?
I originally had an array[1..1000] that was defined as a global variable. But now I need that to be n, not 1000 and I don't find out n until later. I know what n is before I fill the array up but I need it to be global therefore need a way to define the size of a global array at run time. Context is filling an array with a linear transformation of the bytes in a file. I don't know how big the file is until someone wants to open it and the files can be of any size. As of Delphi 4, Delphi supports dynamic arrays . You can modify their sizes at run time and they will retain the data you stored in