From: RHARWOOD@EAST.Pima.edu (Ray Harwood)
Subject: GetACharacter(KeyPressed)
Date: 23 Nov 90 20:44:00 GMT [thread overview]
Message-ID: <FDAE1EDEFFBDA0490B@Arizona.edu> (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
reply other threads:[~1990-11-23 20:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox