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,FREEMAIL_FROM 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-7-bit Path: g2news2.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe13.iad.POSTED!4a71828c!not-for-mail From: Hyman Rosen User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: C getchar() functionality in Ada References: <4999ce31$0$90266$14726298@news.sunsite.dk> <3apeng.mtg.ln@hunter.axlog.fr> <499b1430$0$90267$14726298@news.sunsite.dk> In-Reply-To: <499b1430$0$90267$14726298@news.sunsite.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@WWWSpace.NET NNTP-Posting-Date: Tue, 17 Feb 2009 20:24:58 UTC Date: Tue, 17 Feb 2009 15:24:32 -0500 Xref: g2news2.google.com comp.lang.ada:4650 Date: 2009-02-17T15:24:32-05:00 List-Id: Thomas Locke wrote: > But I understand what you're saying: No end of line characters in Ada! > Except perhaps when using Get_Immediate and Look_Ahead? The Ada design has the same error here as Pascal did. End of Line and End of File are like a craps table; you can know whether the table *was* hot or cold, but you cannot know whether the table *will be* hot or cold. Similarly, you cannot know whether you are at end of line or end of file until you have tried reading a character. Ada pretends otherwise, but behind the scenes it's doing a secret character read-ahead, which is what causes the odd behavior. I speak about the various modern OSes. Presumably, once upon a time input was such that this paradigm made sense, just like Fortran had special output formatting characters to rotate the roll of paper.