comp.lang.ada
 help / color / mirror / Atom feed
From: Alex Mentis <asmentis@gmail.com>
Subject: Re: How to exit a loop with keyboard input
Date: Mon, 12 Apr 2010 13:57:46 -0700 (PDT)
Date: 2010-04-12T13:57:46-07:00	[thread overview]
Message-ID: <1ae9ff84-2a28-41a2-9669-f88577020037@q23g2000yqd.googlegroups.com> (raw)
In-Reply-To: 176f2831-ce2a-4bb1-9e04-47f662fc7176@q23g2000yqd.googlegroups.com

On Apr 12, 12:12 am, Jerry <lancebo...@qwest.net> 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




  parent reply	other threads:[~2010-04-12 20:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-12  4:12 How to exit a loop with keyboard input Jerry
2010-04-12  8:50 ` Georg Bauhaus
2010-04-12  9:21   ` Manuel Collado
2010-04-12 10:36 ` Jerry
2010-04-12 13:59   ` John McCormick
2010-04-13 19:38     ` Jerry
2010-04-12 15:14   ` Tero Koskinen
2010-04-12 16:16     ` John B. Matthews
2010-04-12 20:04     ` Simon Wright
2010-04-13 19:51       ` Jerry
2010-04-13 21:22         ` Simon Wright
2010-04-15  3:39           ` Jerry
2010-04-15  4:08             ` John B. Matthews
2010-04-15 18:51               ` Jerry
2010-04-16  0:44                 ` John B. Matthews
2010-04-16  4:43                   ` Simon Wright
2010-04-16 14:03                     ` John B. Matthews
2010-04-15 19:22             ` Simon Wright
2010-04-16 10:25               ` Jerry
2010-04-12 20:57 ` Alex Mentis [this message]
2010-04-12 22:51   ` Jerry
2010-04-16  0:06     ` BrianG
2010-04-16  7:23       ` Jerry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox