Fortran Users! Is there a better way to do this?

Ron Hudson <[email protected]>
Newsgroups gmane.comp.emulators.turnkey-mvs
Message-ID <[email protected]>
Hey fellow fortran users..

I have a program that produces a long list of numbers calculated one after
the other.
I want to print these numbers 5 wide to save 'paper'

What I am doing now:

an array(5)
a pointer = 0
loop
   increment pointer
   fill array(pointer) with next calculated result)
   if pointer = 5
       print array on a line of the page
       zero pointer
until done calculating
if (pointer .ge. 1) print array(1 - pointer)
...

Is there a better way?

Ron
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.