comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: Reading from keyboard (was: Here's a quicky - please help!)
Date: 1997/05/06
Date: 1997-05-06T00:00:00+00:00	[thread overview]
Message-ID: <336F94E6.3359@gsfc.nasa.gov> (raw)
In-Reply-To: 01bc5a54$49a60120$9a82a6c3@swh2tpv


Chris Westcott wrote:
> 
> Please, please,please help me.
> I am fairly new to ADA but have been programming in Pascal for some time
> now.
> Could somebody please help me in reading from the keyboard!!

It's more polite to put the real subject in the subject line. A lot of
us just ignore articles that only say "Please help!". You caught me at
the end of the day, when I don't have the energy for real work :-)

> 
> By doing:
>         GET(inkey);
> where inkey is a character, GET waits for a cariage return before accepting
> the key.
> I want to get the key without pressing <CR>.
> Can you please help.

See Text_IO.Get_Immediate. This is supposed to not wait for the <CR>,
but it depends on whether your compiler does this or not. The latest
version of GNAT does, at least for some platforms. (It is also polite to
say what platform you are using, and what version of what compiler).

> 
> Also I am trying to use the cursor keys but have no idea how to get them to
> work.  Is there some way of reading them.  (Scan codes/ or ASCII)

I can't help you there, but there are some packages that have been
written to do this. Start at the Ada home web page:

http://www.adahome.com/

and look around for resources and/or source code libraries. You'll find
it, and lots of other good stuff, to.

> 
> Thank you
>         Chris Westcott.

You're welcome

> 
> PS- I am a student and I won't go away!!!!

This is NOT an effective threat; it's easy to ignore annoying posts
(just skip any subject line that is not meaningfull !-)

-- 
- Stephe




       reply	other threads:[~1997-05-06  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <01bc5a54$49a60120$9a82a6c3@swh2tpv>
1997-05-06  0:00 ` Stephen Leake [this message]
1997-05-07  0:00 ` Here's a quicky - please help! Albert K. Lee
1997-05-08  0:00 ` Michael F Brenner
replies disabled

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