comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Get_Immediate Hangs
Date: Wed, 30 Sep 2015 14:49:22 -0700
Date: 2015-09-30T14:49:22-07:00	[thread overview]
Message-ID: <muhl9a$l0e$1@dont-email.me> (raw)
In-Reply-To: <1mbkf1s.yz7qf4p349raN%csampson@inetworld.net>

On 09/30/2015 02:13 PM, Charles H. Sampson wrote:
> I'm getting a behavior from Get_Immediate that is not what I expect from
> the manual. I'm using the form
> 
>      Get_Immediate (Item : out Character; Available: out Boolean);
> 
> It does not return immediately (with Available = False) if no character
> is available. It does not return immediately (with Available = True) if
> a character is typed. It only returns (with Available = True) if one or
> more characters are typed followed by carriage return. In this case all
> of the typed characters are returned, one after the other, including the
> carriage return.
> 
> I'm using an ancient version of Gnat on an ancient Mac's Unix (Darwin).

Clearly your implementation ignores the implementation advice in ARM A.10.7(23)
and reads from a buffer, which is apparently only filled when the user presses
Enter. Not much you can do about that except use a different implementation.

-- 
Jeff Carter
"Don't knock masturbation. It's sex with someone I love."
Annie Hall
45


  parent reply	other threads:[~2015-09-30 21:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 21:13 Get_Immediate Hangs Charles H. Sampson
2015-09-30 21:32 ` Simon Wright
2015-09-30 22:42   ` Charles H. Sampson
2015-09-30 21:49 ` Jeffrey R. Carter [this message]
2015-10-01  2:44 ` Matt Borchers
replies disabled

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