Path: utzoo!attcan!utgpu!watmath!clyde!att!osu-cis!killer!vector!chip From: chip@vector.UUCP (Chip Rosenthal) Newsgroups: comp.lang.c Subject: Re: INKEY$ [Was: printf, data presentation] Message-ID: <686@vector.UUCP> Date: 11 Jan 89 03:59:57 GMT References: <19@xenlink.UUCP> <225800106@uxe.cso.uiuc.edu> Reply-To: chip@vector.UUCP (Chip Rosenthal) Organization: Dallas Semiconductor Lines: 16 In article <225800106@uxe.cso.uiuc.edu> mcdonald@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@vector.UUCP | Choke me in the shallow water Dallas Semiconductor 214-450-5337 | before I get too deep.