From: BrianG <briang000@gmail.com>
Subject: Re: How to exit a loop with keyboard input
Date: Thu, 15 Apr 2010 20:06:47 -0400
Date: 2010-04-15T20:06:47-04:00 [thread overview]
Message-ID: <hq89m3$fug$1@news.eternal-september.org> (raw)
In-Reply-To: <8df458e5-3310-4c9b-adef-638908401626@r18g2000yqd.googlegroups.com>
Jerry wrote:
> On Apr 12, 1:57 pm, Alex Mentis <asmen...@gmail.com> wrote:
> snip
>> 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
>
> I'm not using GPS, but I thought of the possibility of a problem with
> the development environment which in my case is Apple's Xcode. That's
> why I executed in three other terminal programs (including Apple's
> Terminal.app, the terminal in Path Finder, and something called
> iTerm), but all gave the same result. Which doesn't completely answer
> the question of stealth buffering. But given the discussion above
> about a patch I'm guessing the problem is not weird buffering.
>
> Jerry
When GNAT for DOS/Windows (yeah, a while ago - remember Ada9X?) did
this, I used a 'wimp out' solution:
function KB_Hit return Boolean;
pragma Import(KB_Hit, "kbhit"); --not sure of the syntax
...
exit when KB_Hit;
...
(of course you have to remember to Flush or equiv)
Not pretty, but it worked.
--BrianG
--I'm in a groove now -
-- Or is it a rut?
next prev parent reply other threads:[~2010-04-16 0:06 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
2010-04-12 22:51 ` Jerry
2010-04-16 0:06 ` BrianG [this message]
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