Re: Fortran Users! Is there a better way to do this?
Rick Fochtman <[email protected]>
| Newsgroups | gmane.comp.emulators.turnkey-mvs |
|---|---|
| Message-ID | <[email protected]> |
------------------------------<snip>------------------------------------- > > > 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 > -------------------------------------------<unsnip>------------------------------------ Looks fine to me. That's how I'd do it as well.