comp.lang.ada
 help / color / mirror / Atom feed
* GetACharacter(KeyPressed)
@ 1990-11-23 20:44 Ray Harwood
  0 siblings, 0 replies; only message in thread
From: Ray Harwood @ 1990-11-23 20:44 UTC (permalink / raw)


In Info-Ada #207, Arne Gehlhaar asks about "reading characters without pressing
a return."  I'd like to make a few observations that might help this specific
question, and the understanding of Ada in general:

1)  The Ada package TEXT_IO merely presents PROCEDURES and FUNCTIONS (okay,
maybe some types, too!).  It strikes me a little odd that Arne says "there is
no Ada COMMAND that allows me...".  There is quite a difference between the
actual Ada LANGUAGE syntax (while-loop, for-loop, case statement, etc) and the
available "routines" provided with any ONE particular compiler.

2) From it's Pascal heritage, keyboard-oriented IO relies heavily on the
operating system (or some intermediary) to give the user a line editing
capability prior to actually "sending" a line of input to the program.  Any
attempt to get(x) in Ada (or READ or READLN in Pascal) basically halts program
execution until a carriage return is entered.

I'd suggest using package sequential_io, using a CHARACTER as the "item type"
being read... sequential_io and direct_io are typically (!) NOT buffered.

Ray Harwood, Data Basix
PO Box 18324
Tucson, AZ 85731
AppleLink: DATA.BASIX
CompuServe: 76645,1370
Phone: (602)721-1988
FAX: (602)721-7240
Associate Faculty, Pima Community College

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1990-11-23 20:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1990-11-23 20:44 GetACharacter(KeyPressed) Ray Harwood

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