152. Write to many files by creating file names with internal write.#

topic: Input and Output

Note

This tip is a draft1.

To portably create many files named by integers with specified prefix and suffix you can loop over the integers and in the loop body use an internal write to create the file name, connect the file to a unit, write to it, and then close it.



1

From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.