From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,877b86c72a411142 X-Google-Attributes: gid1164f8,public X-Google-Thread: 1094ba,877b86c72a411142 X-Google-Attributes: gid1094ba,public X-Google-ArrivalTime: 1994-02-24 03:34:28 PST Xref: gmd.de comp.sys.dec:13583 comp.lang.fortran:10360 Newsgroups: comp.sys.dec,comp.lang.fortran Path: gmd.de!newsserver.jvnc.net!netnews.upenn.edu!dsinc!ub!news.kei.com!sol.ctr.columbia.edu!howland.reston.ans.net!pipex!uknet!pavo.csi.cam.ac.uk!michael From: michael@mail.ast.cam.ac.uk (Michael Lemke) Subject: Re: Internal List Directed I/O Message-ID: <1994Feb24.113428.20960@infodev.cam.ac.uk> Keywords: FORTRAN Sender: news@infodev.cam.ac.uk (USENET news) Nntp-Posting-Host: cast0.ast.cam.ac.uk Organization: Institute of Astronomy, Cambridge, UK References: <37472@dog.ee.lbl.gov> Date: Thu, 24 Feb 1994 11:34:28 GMT In article <37472@dog.ee.lbl.gov>, Christopher T. Day wrote: >Can anyone tell me the ANSI standard status of list directed I/O (I in >particular) >from internal files in FORTRAN 77? Various processors are giving me different >interpretations. Microsoft PowerStation flags it as an error at compile >time. The >OSF/1 AXP system flags it as an error at run time. HP and Sun systems >don't have >any problem with the idea. I can't find anything in my FORTRAN 77 book >forbidding >it or allowing non-support as an option; I infer that it should be allowed. Your inference is wrong. I don't have the exact wording handy but list directed I/O is not allowed from internal files in Fortran 77. If you run across a machine that doesn't have it as an extension there are only two methods I know of. The first gives you true list directed I/O as implemented on your particular machine but is probably very slow: character*77 c open(1, status = 'scratch' ) write( 1, '(a)' ) c rewind 1 read( 1, * ) a, b, d, ... You get the idea. The other option is to decode the numbers yourself from the string. Fairly tedious and you don't get necessarily identical behavior to the machine's implementation. But possible to do and if you need it a lot you might get a faster program. Sorry, no example I could post. >My >FORTRAN 90 book positively recommends it as an effective programming technique. >What's the official word? It's making ports a bit of a pain. (Short term, is >there a way to get the AXP system to accept the idea?) Thanks. > Don't know what to do on the AXP but running VMS and DEC Fortran will certainly do it. Fortran90 allows list directed I/O from internal files as far as I've read on this board. Michael -- Michael Lemke Institute of Astronomy, Cambridge UK (michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])