WANTED: do while no key pressed (in portable code)
Chris Torek
chris at mimsy.UUCP
Sun Mar 26 14:47:49 AEST 1989
In article <22064 at agate.BERKELEY.EDU> air at anableps.berkeley.edu writes:
>title says it all.
Titles get truncated, so here it is again:
>WANTED: do while no key pressed (in portable code)
Step 1: define, portably, `key pressed'.
I can think of a number of different definitions:
- there is input available (has nothing to do with `keys' pe se)
- terminal input is available, character-at-a-time
- a non-modifier (not SHIFT, etc.) key on a computer keyboard
is in the `down' position
- any key (including SHIFT) is in the down position
The only one that can even make a pretense at portability is the
first, and on a closer look, one discovers that there is no portable
way to do that either.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.lang.c
mailing list