comp.lang.ada
 help / color / mirror / Atom feed
* Handling interrupts
@ 2001-11-23 21:14 Jean-David Tr�panier
  2001-11-23 21:40 ` David C. Hoos, Sr.
  2001-11-23 22:07 ` chris.danx
  0 siblings, 2 replies; 3+ messages in thread
From: Jean-David Tr�panier @ 2001-11-23 21:14 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

Hi! I would like to discover how to use interrupts handlers on Ada95 so I
was wondering if someone has an example that show how to attach a handler to
the keyboard. Example: when you press on a key, the system write a message:
"key pressed".


Thanks a lot,

Jean-David Tr�panier
(JDT@hy.cgocable.ca)





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

* Re: Handling interrupts
  2001-11-23 21:14 Handling interrupts Jean-David Tr�panier
@ 2001-11-23 21:40 ` David C. Hoos, Sr.
  2001-11-23 22:07 ` chris.danx
  1 sibling, 0 replies; 3+ messages in thread
From: David C. Hoos, Sr. @ 2001-11-23 21:40 UTC (permalink / raw)
  To: comp.lang.ada


----- Original Message -----
From: "Jean-David Tr�panier" <JDT@hy.cgocable.ca>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: November 23, 2001 3:14 PM
Subject: Handling interrupts


> Hi! I would like to discover how to use interrupts handlers on Ada95 so I
> was wondering if someone has an example that show how to attach a handler to
> the keyboard. Example: when you press on a key, the system write a message:
> "key pressed"
If that which interests you is just the keyboard, then you don't need an
interrupt
handler.  You should look at Ada.Text_IO.Get_Immediate which can wither
be called so as to not return until a key has been pressed, or to return
immediately with a Boolean object set to indicate whether a new character
is available.

If you're looking for keyboard scan codes -- e.g. to get non-character inputs
such as funcion keys or the change of state of the Shift, Alt, or Ctl keys,
then you have an OS-dependent problem.
 .
<snip>





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

* Re: Handling interrupts
  2001-11-23 21:14 Handling interrupts Jean-David Tr�panier
  2001-11-23 21:40 ` David C. Hoos, Sr.
@ 2001-11-23 22:07 ` chris.danx
  1 sibling, 0 replies; 3+ messages in thread
From: chris.danx @ 2001-11-23 22:07 UTC (permalink / raw)



"Jean-David Tr�panier" <JDT@hy.cgocable.ca> wrote in message
news:F1zL7.5993$qw1.1034012@weber.videotron.net...
> Hi! I would like to discover how to use interrupts handlers on Ada95 so I
> was wondering if someone has an example that show how to attach a handler
to
> the keyboard. Example: when you press on a key, the system write a
message:
> "key pressed".

Can you get hold of a copy of Cohens book (from a library or something, it's
really expensive to buy)?  If so Section 19.6 is all about handlers, and was
quite good if memory serves.

HTH,
Chris

> Thanks a lot,
>
> Jean-David Tr�panier
> (JDT@hy.cgocable.ca)
>
>




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

end of thread, other threads:[~2001-11-23 22:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-23 21:14 Handling interrupts Jean-David Tr�panier
2001-11-23 21:40 ` David C. Hoos, Sr.
2001-11-23 22:07 ` chris.danx

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