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: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: C getchar() functionality in Ada Date: Wed, 18 Feb 2009 08:43:52 +0100 Organization: Adalog Message-ID: References: <4999ce31$0$90266$14726298@news.sunsite.dk> <3apeng.mtg.ln@hunter.axlog.fr> <499b1430$0$90267$14726298@news.sunsite.dk> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1234936233 13415 195.25.228.57 (18 Feb 2009 05:50:33 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Wed, 18 Feb 2009 05:50:33 +0000 (UTC) User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) In-Reply-To: <499b1430$0$90267$14726298@news.sunsite.dk> Xref: g2news1.google.com comp.lang.ada:3689 Date: 2009-02-18T08:43:52+01:00 List-Id: Thomas Locke a �crit : [...] > This program *almost* work exactly as the C version, but not quite. It > fails to recognize all EOL's in files, Could you tell in which cases? > and it behaves a bit "odd" when > feeding data to it using the keyboard. > Depends on your definition of "odd". The time when you see the output may not be what you expect in relation to your input, because Text_IO needs some look-ahead to deal with page breaks; however, the output should correspond to your input (with maybe a small shift in time). Remember too that the model is a file, and the keyboard is a device. It is in general acceptable to treat it as a file, but for things like timing, it is not. > But I understand what you're saying: No end of line characters in Ada! > > Except perhaps when using Get_Immediate and Look_Ahead? > > /Thomas Look_Ahead has a parameter to tell when you are at end of line. The behaviour of Get_Immediate is less clear from the RM. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr