Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!samsung!noose.ecn.purdue.edu!sanandreas.ecn.purdue.edu!moshkovi From: moshkovi@sanandreas.ecn.purdue.edu (Gennady Moshkovich) Newsgroups: comp.lang.fortran Subject: Re: Implied do loop in write (SUMMARY) Message-ID: Date: 23 Apr 91 22:04:04 GMT References: <1991Apr23.201123.3908@unixg.ubc.ca> Sender: root@noose.ecn.purdue.edu (ECN System Management) Organization: Purdue University Engineering Computer Network Lines: 33 buckland@cheddar.ucs.ubc.ca (Tony Buckland) writes: >In article moshkovi@eurotunnel.ecn.purdue.edu (Gennady Moshkovich) writes: >> do 1 i = 1,n >> write(6,100) (matrix(i,j),j=1,m) >> 1 continue >>100 format(10i8) ^^^^ THIS IS THE PROBLEM !! >> >>This way, however, is quite obvious, and it was implied in >>the original posting that the whanted one is the way to >>print _without knowing_ before values of m and n. > So what's your problem with this method? It *does* work > without the values of m and n being known ahead of time. > You're supposed to use the code as it was written, you > know. You're not supposed to substitute constants in > the code where variables are shown. 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. I can repeat again !!!. I don't know beforehand how many elements I have, I can have 3, or I can have 300, but the output MUST look nice. Have fun. Gene -- Gennady Moshkovich Purdue University Department of Civil Engineering moshkovi@ecn.purdue.edu