comp.lang.ada
 help / color / mirror / Atom feed
From: Kilgallen@SpamCop.net (Larry Kilgallen)
Subject: AI-248 and counting the elements in an external file
Date: 23 May 2003 15:48:17 -0500
Date: 2003-05-23T15:48:17-05:00	[thread overview]
Message-ID: <qN$+hNiTRFwu@eisner.encompasserve.org> (raw)
In-Reply-To: x7vof1t780x.fsf@smaug.pushface.org

I suppose my lack of experience with Ada95 streams ('read, etc.)
may be the reason for my confusion, but in reading

	http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00248.TXT?rev=1.16

I see in several places the text:

	The size of an external file is the number of
	stream elements contained in the file.

That is straightforward for a file of some record type, or a file of
integers, but what if the file is one created with Ada95 stream semantics ?
I thought that 'write and write() relied upon the reading program to know
"how" to read the file, and that implementations would not have kept a
tally of how many elements were in the file.

I don't know enough about this to know if it is possible to do a linear
search of a file to count the elements, but even if it were, that would
be a very slow operation.

Is it envisioned by the authors of AI-248 that implementations would
preserve metadata containing the element count ?  If so, what about
stream files that were written under Ada95 ?  Or can someone suggest
what it is that I don't understand about Ada streams ?



  reply	other threads:[~2003-05-23 20:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-21  0:07 'Write attribute vs Write procedure Jano
2003-05-21  0:42 ` tmoran
2003-05-21  7:48   ` Ole-Hjalmar Kristensen
2003-05-21  9:23   ` Ole-Hjalmar Kristensen
2003-05-21 16:22     ` tmoran
2003-05-22  7:51       ` Ole-Hjalmar Kristensen
2003-05-21 16:24     ` tmoran
2003-05-21 21:17     ` Simon Wright
2003-05-22  8:02       ` Ole-Hjalmar Kristensen
2003-05-22 13:49       ` Marc A. Criley
2003-05-22 20:07         ` Simon Wright
2003-05-23  6:09   ` Craig Carey
2003-05-23 19:55     ` Simon Wright
2003-05-23 20:48       ` Larry Kilgallen [this message]
2003-05-23 21:12         ` AI-248 and counting the elements in an external file Stephen Leake
2003-05-23 21:45           ` Randy Brukardt
2003-05-24  1:45             ` Larry Kilgallen
2003-05-24 22:00               ` Robert I. Eachus
2003-05-25  3:54                 ` Larry Kilgallen
2003-05-27 20:19                   ` Randy Brukardt
2003-05-27 20:57                     ` Larry Kilgallen
2003-05-28 18:26                       ` Randy Brukardt
2003-05-24  1:42           ` Larry Kilgallen
2003-05-28 21:17             ` Brian Gaffney
2003-05-28 22:06               ` Larry Kilgallen
2003-05-24 14:11 ` 'Write attribute vs Write procedure Craig Carey
replies disabled

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