comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: How do I make HOTKEYS in ADA?
Date: 1996/10/07
Date: 1996-10-07T00:00:00+00:00	[thread overview]
Message-ID: <DywwC5.Evz.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 3256B8C7.18F9@access.hky.com


Randy Kosarik (randyk@access.hky.com) wrote:

: 	I need to know if I can get ADA to scan the keyboard and return the
: ASCII value if a keystroke was made. This also cannot stop the execution
: of the program and wait for <ENTER>.

The "Get_Immediate" procedure in the Ada 95 Ada.Text_IO is designed to provide
this, though it is still implementation-dependent whether on any
given operating system, this capability is/can be supported.

For Ada 83, or Ada 95 systems where Get_Immediate does not provide
the desired functionality, you should be able to use pragma Interface 
(Ada 83) or pragma Import (Ada 95) to connect up to the appropriate 
underlying system call.  Alternatively, your compiler may already
come with a means of accessing this underlying operating system
capability.

: 	I have a project in my Software Engineering class and am learning ADA
: on the fly. 

:   Thanks in advance to any/all that gives advice on this!!! 

If you could specify the compiler and the hardware/OS platform, we
could probably provide more help.  You should also consult whatever
literature is available on the compiler you are using, especially if
it is an Ada 83 compiler.  For Ada 95, Ada.Text_IO.Get_Immediate should
do the trick, if the underlying O/S supports it.

: -Randy

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Cambridge, MA  USA




  reply	other threads:[~1996-10-07  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-05  0:00 How do I make HOTKEYS in ADA? Randy Kosarik
1996-10-07  0:00 ` Tucker Taft [this message]
1996-10-08  0:00 ` Jon S Anthony
1996-10-10  0:00   ` Keith Thompson
1996-10-10  0:00     ` Larry Kilgallen
1996-10-11  0:00       ` Randy Kosarik
1996-10-15  0:00         ` John Herro
1996-10-11  0:00       ` Robert Dewar
1996-10-11  0:00   ` Jon S Anthony
1996-10-14  0:00   ` Norman H. Cohen
1996-10-16  0:00   ` Jon S Anthony
replies disabled

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