* keyboard polling in ADA
@ 1995-03-09 2:13 Matthew S Low
1995-03-10 9:31 ` David Arno
0 siblings, 1 reply; 5+ messages in thread
From: Matthew S Low @ 1995-03-09 2:13 UTC (permalink / raw)
Our software engineering class is attempting to write an ADA program that
requires keyboard polling. In other words, we want to enter a loop and
continue that loop until the user presses any key on the keyboard. This
sounds like a fairly easy process to implement, but a very difficult one to
find info on. Any info or hints on how to achieve keyboard polling using ADA
would be greatly appreciated. Thanks.
Matt Low
(mlow@galaxy.calpoly.edu)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: keyboard polling in ADA
1995-03-09 2:13 keyboard polling in ADA Matthew S Low
@ 1995-03-10 9:31 ` David Arno
0 siblings, 0 replies; 5+ messages in thread
From: David Arno @ 1995-03-10 9:31 UTC (permalink / raw)
In article <3jlo93$4pv@galaxy.csc.calpoly.edu>
mlow@galaxy.csc.calpoly.edu "Matthew S Low" writes:
> Our software engineering class is attempting to write an ADA program that
> requires keyboard polling. In other words, we want to enter a loop and
> continue that loop until the user presses any key on the keyboard. This
> sounds like a fairly easy process to implement, but a very difficult one to
> find info on. Any info or hints on how to achieve keyboard polling using ADA
> would be greatly appreciated. Thanks.
>
> Matt Low
> (mlow@galaxy.calpoly.edu)
>
>
>
Perhaps if you specified what computer you are attempting to do this on, you
might get some help from ppl.
--
David Arno
^ permalink raw reply [flat|nested] 5+ messages in thread
* keyboard polling in ADA
@ 1995-03-10 17:26 Matthew S Low
1995-03-10 22:34 ` David Wheeler
0 siblings, 1 reply; 5+ messages in thread
From: Matthew S Low @ 1995-03-10 17:26 UTC (permalink / raw)
I'm sorry, in my last posting for keyboard polling in Ada I forgot to
mention that I am attempting to do this using BSD UNIX. I was also asked
whether I was trying to "do something" while the program looped waiting for
a keystroke, and the answer is yes. I'm beginning to look into the areas of
interrupts and forking tasks in ADA. Any help or suggestions would be
greatly appreciated.
Matt
(mlow@galaxy.calpoly.edu)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: keyboard polling in ADA
1995-03-10 17:26 Matthew S Low
@ 1995-03-10 22:34 ` David Wheeler
1995-03-12 3:32 ` Robert Dewar
0 siblings, 1 reply; 5+ messages in thread
From: David Wheeler @ 1995-03-10 22:34 UTC (permalink / raw)
Matthew S Low (mlow@galaxy.csc.calpoly.edu) wrote:
: I'm sorry, in my last posting for keyboard polling in Ada I forgot to
: mention that I am attempting to do this using BSD UNIX. I was also asked
: whether I was trying to "do something" while the program looped waiting for
: a keystroke, and the answer is yes. I'm beginning to look into the areas of
: interrupts and forking tasks in ADA. Any help or suggestions would be
: greatly appreciated.
There are at least 3 ways I can think of:
1. Use a pragma Convention(...) and call the operating system, presuming
that the OS provides a way to poll the keyboard.
This is usually easy.
2. Use Ada 95, which has a way to poll the keyboard in Text_IO.
3. Use Ada tasks to implement this.
For an example, see the "PDI" example at:
http://lglwww.epfl.ch/Ada/Examples/PDI/
This sort of stuff depends on the Ada implementation & OS interface.
--- David A. Wheeler
Net address: wheeler@ida.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: keyboard polling in ADA
1995-03-10 22:34 ` David Wheeler
@ 1995-03-12 3:32 ` Robert Dewar
0 siblings, 0 replies; 5+ messages in thread
From: Robert Dewar @ 1995-03-12 3:32 UTC (permalink / raw)
David Wheeler said
"1. Use a pragma Convention(...) and call the operating system, presuming
that the OS provides a way to poll the keyboard.
This is usually easy."
He meant pragma Import, pragma Convention won't get you very far in calling
an operating system service routine!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1995-03-12 3:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-03-09 2:13 keyboard polling in ADA Matthew S Low
1995-03-10 9:31 ` David Arno
-- strict thread matches above, loose matches on Subject: below --
1995-03-10 17:26 Matthew S Low
1995-03-10 22:34 ` David Wheeler
1995-03-12 3:32 ` Robert Dewar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox