INKEY$ [Was: printf, data presentation]

Scott Wilson swilson%thetone at Sun.COM
Thu Jan 12 07:41:49 AEST 1989


In article <686 at vector.UUCP> chip at vector.UUCP (Chip Rosenthal) writes:
>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.

Who said anything about UNIX?  This is comp.lang.c not comp.lang.c.on.unix.
And yes C does run in environments other than UNIX which is probably why
the original poster would like to see inkey() standardized.  And even
if this was comp.lang.c.on.unix why assume everyone is using a UNIX that
has SV style tty drivers?  Sorry for being snotty, but I get tired of
people spitting out "simple" solutions that don't necessarily make sense
in the scope of a newsgroup.


--
Scott Wilson		arpa: swilson at sun.com
Sun Microsystems	uucp: ...!sun!swilson
Mt. View, CA



More information about the Comp.lang.c mailing list