| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | #11759-#inkey |
#: 11762 S3/Languages
13-Aug-91 19:05:11
Sb: #11759-#inkey
Fm: Bruce MacKenzie 71725,376
To: PHIL SCHERER 71211,2545 (X)
Phil,
Your function can easily be modified so as not to hang in the read:
inkey()
{
char c;
if(getstat(1,0)==0)
{
read(0,&c,1);
return c;
}
else
return -1;
}
Here a returned value of -1 indicates that no key has been pressed.
There is 1 Reply.
|
|
| SOURCE: compuserve via textfiles.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.