file_name_sequence


file_name_sequence, a Fortran90 code which demonstrates ways of generating a sequence of file names with an embedded index that increases.

There are situations such as animations or parallel processing in which it is necessary to generate a sequence of file names which include an embedded index that increases. A simple example might be

        'fred0.txt', 'fred1.txt', 'fred2.txt'
      
A side issue arises when the number of files is large enough that the number of digits in the index will vary. Thus, if we are going to have 15 files, do we want to number them as
        'fred00.txt' through 'fred14.txt'
      
which means, for one thing, that they will alphabetize properly, or will we be satisfied with
        'fred0.txt' through 'fred14.txt' ?
      

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

file_name_sequence is available in a C version and a C++ version and a Fortran77 version and a Fortran90 version and a MATLAB version and a Python version and an Octave version.

Related Data and codes:

file_name_sequence_test

files_multiple, a Fortran90 code which demonstrates how a code can open multiple output files at one time, and write data to any one specific file it chooses.

filum, a Fortran90 code which works with information in text files.

Source Code:


Last revised on 09 July 2020.