Re: Get_Line problem (GNAT bug?)
- From: Jean-Pierre Rosen <rosen@xxxxxxxxx>
- Date: Thu, 07 Dec 2006 10:14:05 +0100
Dmitry A. Kazakov a écrit :
The rules of thumb I suppose I and many other Ada programmers are using:And I'll add another one:
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.
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@xxxxxxxxx)
Visit Adalog's web site at http://www.adalog.fr
.
- References:
- Get_Line problem (GNAT bug?)
- From: Maciej Sobczak
- Re: Get_Line problem (GNAT bug?)
- From: Dmitry A. Kazakov
- Get_Line problem (GNAT bug?)
- Prev by Date: Re: Get_Line problem (GNAT bug?)
- Next by Date: Re: Get_Line problem (GNAT bug?)
- Previous by thread: Re: Get_Line problem (GNAT bug?)
- Next by thread: Re: Get_Line problem (GNAT bug?)
- Index(es):
Relevant Pages
|
|