comp.lang.ada
 help / color / mirror / Atom feed
* Get_Immediate Hangs
@ 2015-09-30 21:13 Charles H. Sampson
  2015-09-30 21:32 ` Simon Wright
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Charles H. Sampson @ 2015-09-30 21:13 UTC (permalink / raw)


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).

Charlie
-- 
Nobody in this country got rich on his own.  You built a factory--good.
But you moved your goods on roads we all paid for.  You hired workers we
all paid to educate. So keep a big hunk of the money from your factory.
But take a hunk and pay it forward.  Elizabeth Warren (paraphrased)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Get_Immediate Hangs
  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
  2015-10-01  2:44 ` Matt Borchers
  2 siblings, 1 reply; 5+ messages in thread
From: Simon Wright @ 2015-09-30 21:32 UTC (permalink / raw)


csampson@inetworld.net (Charles H. Sampson) writes:

> I'm getting a behavior from Get_Immediate that is not what I expect from
> the manual.
[...]
> I'm using an ancient version of Gnat on an ancient Mac's Unix (Darwin).

Well, with GCC 5.1.0 on Yosemite it works fine. What actual versions are
you using?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Get_Immediate Hangs
  2015-09-30 21:13 Get_Immediate Hangs Charles H. Sampson
  2015-09-30 21:32 ` Simon Wright
@ 2015-09-30 21:49 ` Jeffrey R. Carter
  2015-10-01  2:44 ` Matt Borchers
  2 siblings, 0 replies; 5+ messages in thread
From: Jeffrey R. Carter @ 2015-09-30 21:49 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Get_Immediate Hangs
  2015-09-30 21:32 ` Simon Wright
@ 2015-09-30 22:42   ` Charles H. Sampson
  0 siblings, 0 replies; 5+ messages in thread
From: Charles H. Sampson @ 2015-09-30 22:42 UTC (permalink / raw)


Simon Wright <simon@pushface.org> wrote:

> csampson@inetworld.net (Charles H. Sampson) writes:
> 
> > I'm getting a behavior from Get_Immediate that is not what I expect from
> > the manual.
> [...]
> > I'm using an ancient version of Gnat on an ancient Mac's Unix (Darwin).
> 
> Well, with GCC 5.1.0 on Yosemite it works fine. What actual versions are
> you using?

It appears to be GCC 4.0.1. (If I just type GCC, I get an error message
preceded by "powerpc-apple-darwin8-gcc-4.0.1:") I'm running OSX 10.4.11
on a Mac G4.

Charlie
-- 
Nobody in this country got rich on his own.  You built a factory--good.
But you moved your goods on roads we all paid for.  You hired workers we
all paid to educate. So keep a big hunk of the money from your factory.
But take a hunk and pay it forward.  Elizabeth Warren (paraphrased)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Get_Immediate Hangs
  2015-09-30 21:13 Get_Immediate Hangs Charles H. Sampson
  2015-09-30 21:32 ` Simon Wright
  2015-09-30 21:49 ` Jeffrey R. Carter
@ 2015-10-01  2:44 ` Matt Borchers
  2 siblings, 0 replies; 5+ messages in thread
From: Matt Borchers @ 2015-10-01  2:44 UTC (permalink / raw)


How ancient is ancient? I remember this problem from the mid to late ninetys. I submitted a bug report for it and they fixed it. Sorry that I can't recall the version it was fixed in, but I'm sure you could search the bug fixes if you can find them from that far back. 

Matt


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-01  2:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-10-01  2:44 ` Matt Borchers

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