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!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: C getchar() functionality in Ada Date: Tue, 17 Feb 2009 17:40:28 +0100 Organization: Adalog Message-ID: <3apeng.mtg.ln@hunter.axlog.fr> References: <4999ce31$0$90266$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 1234882249 28855 195.25.228.57 (17 Feb 2009 14:50:49 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Tue, 17 Feb 2009 14:50:49 +0000 (UTC) User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) In-Reply-To: <4999ce31$0$90266$14726298@news.sunsite.dk> Xref: g2news1.google.com comp.lang.ada:3674 Date: 2009-02-17T17:40:28+01:00 List-Id: Thomas Locke a �crit : A simple problem, a simple solution. In Ada, an end of line is not a character. Full stop. We have operations that deal with end of lines: new_line, skip_line, and end_of_line. Therefore, your program should look like: with Ada.Text_IO; use Ada.Text_IO; procedure Ito is C : Character; begin while not End_Of_File loop if End_Of_Line then Skip_Line; New_Line; else Get (Item => C); Put (Item => C); end if; end loop; end Ito; -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr