From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: Get_Line problem (GNAT bug?)
Date: Thu, 07 Dec 2006 10:14:05 +0100
Date: 2006-12-07T10:14:05+01:00 [thread overview]
Message-ID: <31m8le.012.ln@hunter.axlog.fr> (raw)
In-Reply-To: <1c1gbc5u9cpvp.1wj1zhhn7q86j$.dlg@40tude.net>
Dmitry A. Kazakov a �crit :
> The rules of thumb I suppose I and many other Ada programmers are using:
>
> 1. Never ever use End_Of_File with text files;
> 2. If you yet use End_Of_File then do it for *each* character of the file;
> 3. As Adam has suggested, End_Error exception is the right design;
> 4. End_Error is not only cleaner and correct, but also more efficient.
>
And I'll add another one:
5. End_Error works correctly with badly formed files, i.e. files whose
last line does not end with and end-of-line mark. You can get strange
behaviour in that case with any other solution.
--
---------------------------------------------------------
J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr
next prev parent reply other threads:[~2006-12-07 9:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-06 14:25 Get_Line problem (GNAT bug?) Maciej Sobczak
2006-12-06 18:06 ` Adam Beneschan
2006-12-06 20:34 ` Gautier
2006-12-06 21:47 ` Dmitry A. Kazakov
2006-12-06 23:40 ` Adam Beneschan
2006-12-07 0:02 ` Björn Persson
2006-12-07 1:09 ` Adam Beneschan
2006-12-07 1:28 ` Björn Persson
2006-12-07 5:00 ` Jeffrey R. Carter
2006-12-07 8:26 ` Maciej Sobczak
2006-12-07 9:21 ` Jean-Pierre Rosen
2006-12-07 13:35 ` Ludovic Brenta
2006-12-07 22:23 ` Robert A Duff
2006-12-07 10:22 ` Dmitry A. Kazakov
2006-12-07 14:51 ` Maciej Sobczak
2006-12-07 16:29 ` Dmitry A. Kazakov
2006-12-08 8:22 ` Maciej Sobczak
2006-12-07 22:50 ` Robert A Duff
2006-12-08 0:13 ` Randy Brukardt
2006-12-08 4:04 ` Larry Kilgallen
2006-12-08 9:11 ` Dmitry A. Kazakov
2006-12-07 9:14 ` Jean-Pierre Rosen [this message]
2006-12-07 3:34 ` Steve
2006-12-07 17:42 ` Adam Beneschan
2006-12-07 22:35 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox