extending array memory

extending array memory

What is the best way of increasing array size in an application that adds data into arrays from records from input files, to allow for indefinite numbers of records from an indefinite number of files (up to a limit of course), without having to define very large (fixed) array sizes at compile time?

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Count the number of records and use an allocatable array of whatever you are using to represent each record's information. If you have a fixed length record, just use GETFILEINFOQQ to get the total size so you can determine the number of records, then ALLOCATE then and read them into the newly allocated array.

James

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen