Jourdan Gold wrote:
> Hello,
>
>
>
> I have a program for which the results are stochastic and I want to
> obtain many versions of the output to assess variability. Currently,
> everytime, I start a new run I need to change the filename and resave
> it. If there a simple way to modify the program so that I can have it
> run many times and record the output in each file seperately. i.e.
> create a loop so that the file name changes automatically after each run
> and then allow it do multiple runs automatically. I am getting tired of
> making a small change and then recompiling the program. it seems
> inefficient.
Just use another file to control the action. All you seem to need in it is a
single integer holding an index. Each time you run, read the index, add one to
it, and write it. Use the index to open a new file with the index concatenated
into its name.
Hope this helps.
John Reid.
|