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 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.


Leave a Comment

Please sign in to add a comment. Not a member? Join today