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

yvette hirth <yvette-RPrnXxQTqyxWk0Htik3J/[email protected]>
Newsgroups gmane.comp.emulators.turnkey-mvs
Organization The DBT Group, Inc.
Message-ID <[email protected]>
John R. Macdonald wrote:

>     Another approach would be to use unformatted I/O, and write your
>     values out to a temporary file. Read that file back in with another
>     language that does more efficient I/O and do your printing at that
>     time. So Fortran does the calculations and writes the numbers to a
>     tape or temp file, which you pass to a second step written in COBOL or
>     PL/I that formats the report.

wouldn't the easiest and fastest approach be to write out all five 
values per line with one format statement?

can't you do:

     do 20 (index = ...)
     v1 = value(index)
     v2 = value(index + 1)
     v3 = value(index + 2)
     v4 = value(index + 3)
     v5 = value(index + 4)
     WRITE (*,*) 'v1=',v1,',  v2=',v2,',  v3=',v3,',  v4=',v4,',  v5=',v5
     index = index + 5
20  continue

?

yvette hirth
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.