Skip to content

Instantly share code, notes, and snippets.

@pozdneev
Created April 23, 2018 09:22
Show Gist options
  • Save pozdneev/2b6eb7f3f412e8d1b7fdebec21675c4b to your computer and use it in GitHub Desktop.
Save pozdneev/2b6eb7f3f412e8d1b7fdebec21675c4b to your computer and use it in GitHub Desktop.
Adding a number as a file name suffix
integer, save :: num_calls = 0
character(len=1024) :: file_suffix
num_calls = num_calls + 1
write (file_suffix, "(I5.5)") num_calls
open(37, file='prefix_' // trim(file_suffix) // '.bin', form='unformatted')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment