Newsgroups: comp.lang.fortran
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!rice!uw-beaver!ubc-cs!unixg.ubc.ca!cheddar.ucs.ubc.ca!buckland
From: buckland@cheddar.ucs.ubc.ca (Tony Buckland)
Subject: Re: Implied do loop in write (SUMMARY)
Message-ID: <1991Apr24.184956.15841@unixg.ubc.ca>
Sender: news@unixg.ubc.ca (Usenet News Maintenance)
Nntp-Posting-Host: cheddar.ucs.ubc.ca
Organization: Computing Services, University of British Columbia
References: <moshkovi.672431251@eurotunnel.ecn.purdue.edu> <1991Apr23.201123.3908@unixg.ubc.ca> <moshkovi.672444244@sanandreas.ecn.purdue.edu>
Date: Wed, 24 Apr 1991 18:49:56 GMT

In article <moshkovi.672444244@sanandreas.ecn.purdue.edu> moshkovi@sanandreas.ecn.purdue.edu (Gennady Moshkovich) writes:
>buckland@cheddar.ucs.ubc.ca (Tony Buckland) writes:
>>In article <moshkovi.672431251@eurotunnel.ecn.purdue.edu> moshkovi@eurotunnel.ecn.purdue.edu (Gennady Moshkovich) writes:
>>>100 format(10i8)
>	     THIS IS THE PROBLEM !!
>Just look at the code, and you will see where the problem is.
>You can't print with this code more then _10_ elements in a row.

 My apologies, I was concentrating on the DO statement.
 If I were using this technique myself - and in fact I often
 have, I would write the FORMAT so as to use up the maximum
 line length on the intended output device.  If that device
 is a terminal, then 10I8 is a quite reasonable choice.  The
 only way you could get more on one line would be if you knew
 the values were low enough in absolute terms to fit into a
 narrower field than I8.  If they were arbitrary fullword
 integers, I8 wouldn't in fact be safe.  For -2**31, you need
 I11 (7 per terminal line), or I12 if you leave a column blank
 for readability (6 per terminal line).  To do *that*, you
 have to know that your matrix line length is no more than 6,
 or 7, or, in the case of the 10I8 format, 8.
