comp.lang.ada
 help / color / mirror / Atom feed
* Keyboard input
@ 1990-09-18 20:32 Gregory M. Stelmack
  1990-09-19 19:27 ` Terry J. Westley
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Gregory M. Stelmack @ 1990-09-18 20:32 UTC (permalink / raw)


Is there any way in Ada to read single keystrokes from the keyboard? Not the
GET from TEXT_IO which requires a carriage return before sending the data, but
as soon as a key is pressed have it sent? We have a whole Ada class that would
like to know, and no one here can help figure it out. So, I ask the net.
We've checked books and can't figure it out.

This is for a Data Structures class where we want to write our own I/O
routines to validate data. But to do what we want to do, we need keys as soon
as they are hit.

There should be an easy way to do it, but we can't find it. Any ideas? E-mail
if its simple so this group doesn't get cluttered due to my ignorance...

Thanks, 
-- Greg Stelmack
-- Email: stelmack@sol.csee.usf.edu
-- USmail: USF Box 1510, Tampa, FL 33620-1510
-- Amiga: the only way to compute!

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: Keyboard input
@ 1990-09-24 19:00 "EDWARD CRAGG"
  0 siblings, 0 replies; 20+ messages in thread
From: "EDWARD CRAGG" @ 1990-09-24 19:00 UTC (permalink / raw)


> From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
> Subject: Keyboard input
> 
   [ text deleted ]

> I would like very much to see a portable character-IO library -
> portable in the sense that there would be an implementation-independent
> package spec. The routine described by Rick Conn in a previous posting is
> a good start in this direction. I will see if I have a copy and post it.
> The package _body_ will necessarily be OS-dependent, because it's something
> that can't be directly written in Ada.

The ALS/N project has taken the approach of writing a package
IMMEDIATE_IO (using VMS QIOW's) which is effectively a TEXT_IO clone
for all the objects for which it makes sense.  (All the various
column/line/page related objects are eliminated).  As a result, it is
interchangeable with TEXT_IO (assuming WITHs and USEs) and does not
require a "thought pattern" change when writing code. When live
keyboard input is required, IMMEDIATE_IO is used, otherwise TEXT_IO is
used.  I have found the package to be very practical and effective. 

ed
 ............................................................
Edward E Cragg                Bitnet:   ECRAGG@GMUVAX
                              Internet: ECRAGG@GMUVAX.GMU.EDU

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

end of thread, other threads:[~1990-09-26 13:16 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1990-09-18 20:32 Keyboard input Gregory M. Stelmack
1990-09-19 19:27 ` Terry J. Westley
1990-09-20 20:29   ` Gregory M. Stelmack
1990-09-20 23:20   ` Charles H. Sampson
1990-09-21 17:50 ` Andy DeFaria
1990-09-22 20:13   ` Michael Feldman
1990-09-24  8:58     ` Richard A. O'Keefe
1990-09-24 13:58       ` Michael Feldman
1990-09-24 16:27         ` Keyboard input on IBM mainframes Jerry Callen
1990-09-24 17:44           ` Ada " Michael Feldman
1990-09-26 13:16             ` ryer
1990-09-26  0:16         ` Keyboard input Chris Holl @adonna
1990-09-22  0:21 ` Naasif Gierdien
1990-09-22  0:25   ` Naasif Gierdien
1990-09-24 16:18 ` Andy DeFaria
1990-09-25 14:11   ` Edward Falis
1990-09-25 15:10   ` Michael Feldman
1990-09-25 18:13   ` John Prentice
1990-09-25 13:36 ` stt
  -- strict thread matches above, loose matches on Subject: below --
1990-09-24 19:00 "EDWARD CRAGG"

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