Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: michael@mail.ast.cam.ac.uk (Michael Lemke)
Subject: Re: Internal List Directed I/O
Date: Thu, 24 Feb 1994 11:34:28 GMT	[thread overview]
Message-ID: <1994Feb24.113428.20960@infodev.cam.ac.uk> (raw)
In-Reply-To: 37472@dog.ee.lbl.gov

In article <37472@dog.ee.lbl.gov>,
Christopher T. Day <ctday@randolf.lbl.gov> 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])


  parent reply	other threads:[~1994-02-24 11:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-02-23 17:25 Internal List Directed I/O Christopher T. Day
1994-02-23 18:23 ` Steve Lionel
1994-02-23 22:17 ` Bill Leonard
1994-02-24 11:34 ` Michael Lemke [this message]
1994-02-25  5:23 ` Robin Vowels
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox