Re: I/O reading formated files
- From: Richard Maine <nospam@xxxxxxxxxxxxx>
- Date: Mon, 17 Jul 2006 08:00:19 -0700
On Sun, 16 Jul 2006 23:02:56 -0700, Julian Bessenroth wrote
(in article <1153116176.186182.145750@xxxxxxxxxxxxxxxxxxxxxxxxxxx>):
Steven G. Kargl schrieb:
READ(2, *, IOSTAT=ios) a,b,c,d
Hmm, I'm a bit confused. What is al that formated reading for if the
best on its own what to do?
It works, but ....?
First, please note that you appear to have made a common terminology
error that leads to much confusion. List-directed I/O *IS* formatted.
If it weren't formatted, humans couldn't read it at all - it would be
in raw bits instead of characters. Yes, the terminology matters, as
people write programs that don't work because of this terminology
confusion (for example, they open a file as "unformatted" because they
intend to use list-directed I/O on it).
What you are asking about is the distinction between two kinds of
formatting - list-directed formatting and explicit formatting. But
anyway...
List directed input is simple, but is far from a universal panacea.
There are many circumstances in which list-directed input does the
wrong thing. A complete treatment of the question is far too long for
here. Thus, yes, the language needs something in addition to
list-directed input. Your particular data appears to well match what
list-directed input can handle and I think it probably the best
solution for your problem; it is certainly a simple one. But
list-directed can't handle everything - for one example, character data
is sometimes in forms that list-directed can't handle.
--
Richard Maine | Good judgment comes from
experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- References:
- I/O reading formated files
- From: Julian Bessenroth
- Re: I/O reading formated files
- From: Steven G. Kargl
- Re: I/O reading formated files
- From: Julian Bessenroth
- I/O reading formated files
- Prev by Date: Re: double confusion
- Next by Date: Re: writing output listing onto screen (or not) and onto file
- Previous by thread: Re: I/O reading formated files
- Next by thread: Re: I/O reading formated files
- Index(es):
Relevant Pages
|