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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,430e73ffe1dca4e9 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!q23g2000yqd.googlegroups.com!not-for-mail From: Alex Mentis Newsgroups: comp.lang.ada Subject: Re: How to exit a loop with keyboard input Date: Mon, 12 Apr 2010 13:57:46 -0700 (PDT) Organization: http://groups.google.com Message-ID: <1ae9ff84-2a28-41a2-9669-f88577020037@q23g2000yqd.googlegroups.com> References: <176f2831-ce2a-4bb1-9e04-47f662fc7176@q23g2000yqd.googlegroups.com> NNTP-Posting-Host: 76.15.10.164 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1271105867 22962 127.0.0.1 (12 Apr 2010 20:57:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 12 Apr 2010 20:57:47 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q23g2000yqd.googlegroups.com; posting-host=76.15.10.164; posting-account=CedHywoAAAAcVQwJt5x8TeyAwJA5ElaR User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:9971 Date: 2010-04-12T13:57:46-07:00 List-Id: On Apr 12, 12:12=A0am, Jerry wrote: > [Sorry for the cross-post.] > I thought Get_Immediate would work (reading Cohen's book) but it does > not do what I want. For example, the following program stops looping > and requires me to hit RETURN even if I hit another key first. It > continues looping (very slowly) if I hold down the RETURN key. > Are you using GPS as your IDE by any chance? When I run programs using Get_Immediate from inside GPS, Get_Immediate does not work as it should (it requires a CR after the character input). When I run those same programs in an external terminal window it works fine. Perhaps something between your keyboard and your program is buffering your input without your knowledge? Alex