When you need to repeat a Format sequence a number of times, but don't know how many, it is traditional to use a large number, such as in the following example.
write(*,'(9999(f7.3,:,1x))') a(1:number)
In such code, the repeat counter 9999 is chosen to be larger than any possible value of number. (The : is used to prevent a space being printed after the last value).
It would be nice to allow the following extension from Fortran 2008 for this case.
write(*,'(*(f7.3,:,1x))') a(1:number)
Just a suggestion 😉