Any thoughts on the following formatting
issue would be much appreciated:
I have a program where several vectors are
of length determined by a parameter
integer,parameter :: n=10
real,dimension(n) :: vector
and I write these to files at several places.
I'd like to have a format statement that
adjusts to the parameter, like
write(unit=*,fmt=1)
1 format(1x,n(f10.8,1x))
but this doesn't work.
In other words, I don't want to have to go through
the code and change 10's to 20's when n changes to 20.
Thanks a lot.
|