From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a0833bbed8752e1f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!proxad.net!freenix!oleane.net!oleane!skymaster!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: variable lenght strings Date: Wed, 27 Oct 2004 14:01:06 +0200 Organization: Adalog Message-ID: References: <1861614.TWv5A9FgVL@linux1.krischik.com> <4178e979_1@baen1673807.greenlnk.net> <1195374.UMjBCk7lO1@linux1.krischik.com> <1154613.ipZcUgduzp@linux1.krischik.com> <1174011.lJ1dcgRM3Q@linux1.krischik.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: s5.feed.news.oleane.net 1098878789 5543 195.25.228.57 (27 Oct 2004 12:06:29 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Wed, 27 Oct 2004 12:06:29 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.2) Gecko/20040803 X-Accept-Language: fr-fr, en-us, en In-Reply-To: <1174011.lJ1dcgRM3Q@linux1.krischik.com> Xref: g2news1.google.com comp.lang.ada:5762 Date: 2004-10-27T14:01:06+02:00 List-Id: Martin Krischik a =E9crit : > Jean-Pierre Rosen wrote: >>In all my programs, I simply never check for End_Of_File, I catch >>End_Error instead. It is simpler in other cases too: if you read >>numbers, and the file is terminated with blank lines, you can get >>End_Error even when End_Of_File is false. >=20 >=20 > Well you could create a Get_Line with End_Error too. But I like to see = where > the "easier" part comes into play: > [snip]=20 I think you missed the point; I was talking about reading *numbers*. In that case, End_Of_File is of no use, because Get will skip any number = of line terminators, and may well hit an End_Of_File. Catching End_Of_File is a lot easier than skipping all the line=20 terminators before reading a number --=20 --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr