INKEY$ [Was: printf, data presentation]
Chip Rosenthal
chip at vector.UUCP
Wed Jan 11 13:59:57 AEST 1989
In article <225800106 at uxe.cso.uiuc.edu> mcdonald at uxe.cso.uiuc.edu writes:
>>From my recollection of BASIC, INKEY$ has two main uses:
>/* (long discussion deleted) */
>The important point is that some such function should be a
>STANDARD C (ANSI C) function
No, that isn't the important point. Such a procedure is generally used
for busy loops, and this is a bad idea. If you are waiting for a keystroke,
then use c_cc[VMIN]=1. If you are waiting for a one of a number of
assynchronous events, then fork processes to block on the various events
and signal the parent to handle it.
Since busy waiting is a bad idea, so is formalizing it in a standard.
--
Chip Rosenthal chip at vector.UUCP | Choke me in the shallow water
Dallas Semiconductor 214-450-5337 | before I get too deep.
More information about the Comp.lang.c
mailing list