TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: Tom Breton 71141,3433 (X)
from: Bruce MacKenzie 71725,376
date: 1990-06-30 22:14:02
subject: #4771-#Help `c` problem again

#: 4790 S3/Languages
    30-Jun-90  22:14:02
Sb: #4771-#Help 'c' problem again
Fm: Bruce MacKenzie 71725,376
To: Tom Breton 71141,3433 (X)

You've got me Tom.  It doesn't work like that on my system--a COCO III, LVL II
with the Microware C compiler.  Not knowing exactly what you've coded, compile
and run the following program.  It should return the ascii value of a key
immediately after it is pressed.

 #include 

 main()
 {
      char c;

      do
      {
           read(fileno(stdin),&c,1);
           printf(" Key = %x/n",(int)c);
      }while(c!='/n');
 }

(the slashes above in /n should be backslashes--the terminal program I'm using
doesn't have them)

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™.