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,8d5bda3619cce0f8 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!k8g2000yqn.googlegroups.com!not-for-mail From: christoph.grein@eurocopter.com Newsgroups: comp.lang.ada Subject: Re: C getchar() functionality in Ada Date: Wed, 18 Feb 2009 02:41:40 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <4999ce31$0$90266$14726298@news.sunsite.dk> <3apeng.mtg.ln@hunter.axlog.fr> NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1234953700 7965 127.0.0.1 (18 Feb 2009 10:41:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 18 Feb 2009 10:41:40 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k8g2000yqn.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 webwasher (Webwasher 6.8.3.4214) Xref: g2news2.google.com comp.lang.ada:4663 Date: 2009-02-18T02:41:40-08:00 List-Id: On Feb 18, 8:46=A0am, Jean-Pierre Rosen wrote: > Jeffrey R. Carter a =E9crit :> Except that, given a file that ends with a= blank line, > > Ada.Text_IO.End_Of_File may return True before the final blank line has > > been detected. The general rule is to not use Ada.Text_IO.End_Of_File, > > and handle the resulting End_Error. > > I agree. Moreover, it behaves better in the case of ill-formed files > (from an Ada point of view), such as those that have no terminating LF. This includes what Jeffrey calls a blank line at end. Such a file is not well-formed in the Ada sense. This is discussed in Text_IO RM A. 10.2(3) and A.10.5(16).