From: Gautier <gautier.demontmollin@maths.unine.ch>
Subject: Re: End of File for streams
Date: 2000/04/17
Date: 2000-04-17T00:00:00+00:00 [thread overview]
Message-ID: <38FB5996.C7CCB816@maths.unine.ch> (raw)
In-Reply-To: 8df15j$e4b$1@trog.dera.gov.uk
Kevin Rigotti wrote:
> 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?
A complement...
- Philosophical ? Is it less tangible or don't you believe it will
work ? No problem, the Manual _guarantees_ that End_Error will be raised
at time!
- Aesthetic ?
...
begin
for i in inbuf'range loop
Read( infile, inbuf(i) );
readpos:= readpos + 1;
end loop;
exception
when End_Error => null; -- nothing, we just reached EOF
end;
...
______________________________________________________
Gautier -- http://members.xoom.com/gdemont/gsoft.htm
next prev parent reply other threads:[~2000-04-17 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-17 0:00 End of File for streams Kevin Rigotti
2000-04-17 0:00 ` Gautier [this message]
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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox