INKEY$ [Was: printf, data presentation]

Dave Levenson dave at westmark.UUCP
Sun Jan 15 10:14:13 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:
...
> >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 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.



Waiting for events (such as keystrokes) is not, in itself, a bad
idea!  A standard library function to do it is a good idea.  Looping
within a process _is_ a bad idea in the UNIX operating system, but
the C language is not supposed to be operating system specific. 
There are operating systems where forking a process is not possible
(are you listening, Microsoft?).

A standard event_wait() might be implemented differently where
fork() is defined, but ought to exist, in some form, in the standard
library for all supported environments, no?

-- 
Dave Levenson
Westmark, Inc.		The Man in the Mooney
Warren, NJ USA
{rutgers | att}!westmark!dave



More information about the Comp.lang.c mailing list