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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news2.google.com!news.glorb.com!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: C getchar() functionality in Ada Reply-To: no to spamers (No@email.given.org) References: <4999ce31$0$90266$14726298@news.sunsite.dk> <3apeng.mtg.ln@hunter.axlog.fr> <499b1430$0$90267$14726298@news.sunsite.dk> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: <_eNml.383383$Mh5.78097@bgtnsc04-news.ops.worldnet.att.net> Date: Wed, 18 Feb 2009 05:44:26 GMT NNTP-Posting-Host: 12.64.140.222 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1234935866 12.64.140.222 (Wed, 18 Feb 2009 05:44:26 GMT) NNTP-Posting-Date: Wed, 18 Feb 2009 05:44:26 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:4659 Date: 2009-02-18T05:44:26+00:00 List-Id: Actually you can input "end of line" and "end of file" character in Ada you just use the "Get_Immediate" routine in "Ada.Text_IO" instead of Get. with Ada.Text_IO ; use Ada.Text_IO ; procedure a is Keystroke : character ; Ready : Boolean ; begin Keystroke := ' ' ; while Keystroke /= 'q' loop -- just away to stop program Get_Immediate ( Keystroke, Ready ) ; if ready then Put ( Keystroke ) ; end if ; end loop ; end ; And is "Ada.Text_IO" broken? Not if you use the correct routine or the correct job. And Ada in the pure form, is a base that one can create better and more useful packages for each job that one needs. In , Robert A Duff writes: >Hyman Rosen writes: > >> Thomas Locke wrote: >>> But I understand what you're saying: No end of line characters in Ada! > ^^^^^^ >....in Ada.Text_IO. > >>> Except perhaps when using Get_Immediate and Look_Ahead? >> >> The Ada design has the same error here as Pascal did. > ^^^^^^^^^^ >....Ada.Text_IO design... > >Text_IO is a bit broken, I agree. But you can also use streams, >or you can interface directly to the underlying OS primitives. > >Ada has a lot of strengths, but unfortunately, the design of the >Ada.Text_IO package is not one of them. > >- Bob