comp.lang.ada
 help / color / mirror / Atom feed
* keypress loop
@ 1997-10-13  0:00 Oli
  1997-10-17  0:00 ` Matthew Heaney
  0 siblings, 1 reply; 2+ messages in thread
From: Oli @ 1997-10-13  0:00 UTC (permalink / raw)



Hi there, just finishing up an ada assignment for 1st year uni, could
anyone help me with some code along these lines....

loop
    .......stuff
exit loop when key press
end loop

It's not due for ages, but I could use a hand, ta :)





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

* Re: keypress loop
  1997-10-13  0:00 keypress loop Oli
@ 1997-10-17  0:00 ` Matthew Heaney
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Heaney @ 1997-10-17  0:00 UTC (permalink / raw)



In article <344217D0.797CD306@iinet.net.au>, ojw@iinet.net.au wrote:

>Hi there, just finishing up an ada assignment for 1st year uni, could
>anyone help me with some code along these lines....
>
>loop
>    .......stuff
>exit loop when key press
>end loop

In package Ada.Text_IO there's a subprogram called Get_Immediate.  The loop
would look something like

loop
   <stuff>

   Ada.Text_IO.Get_Immediate (C, Available);
   exit when Available;
end loop;

<interrogate character C>

Was that what you had in mind?

--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271




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

end of thread, other threads:[~1997-10-17  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-13  0:00 keypress loop Oli
1997-10-17  0:00 ` Matthew Heaney

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