comp.lang.ada
 help / color / mirror / Atom feed
* End of File for streams
@ 2000-04-17  0:00 Kevin Rigotti
  2000-04-17  0:00 ` Gautier
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Kevin Rigotti @ 2000-04-17  0:00 UTC (permalink / raw)


Given an input file accessed via T'Read() on the associated
stream access value, is there a clean way to determine end of file?

All I have at the point of need is the stream access value
not the File_Type object that it was obtained from so I can't
just use Ada.Streams.Stream_IO.End_of_File or compare Index()
with Size().

The file has more than one data type in it, read in different
parts of the source code, so keeping track of how much I've read
is not trivial.

I have philosophical and aesthetic objections to trapping the
End_Error exception as a means of determining end of file, but
is this the only way to do it?

Kevin






^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2000-04-19  0:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-17  0:00 End of File for streams Kevin Rigotti
2000-04-17  0:00 ` Gautier
2000-04-18  0:00   ` Kevin Rigotti
2000-04-17  0:00     ` Robert I. Eachus
2000-04-18  0:00     ` Jean-Pierre Rosen
2000-04-18  0:00       ` Brian Rogoff
2000-04-18  0:00         ` Jean-Pierre Rosen
2000-04-19  0:00           ` Brian Rogoff
2000-04-18  0:00     ` Robert Dewar
2000-04-17  0:00 ` Gautier
2000-04-17  0:00 ` Robert Dewar
2000-04-17  0:00   ` Brian Rogoff

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