TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: DAVID VAN HOOSE
from: DARIN MCBRIDE
date: 1998-03-30 08:57:00
subject: Re: -getch()

-> -getch() is simply getch with the return value negated.
 DVH> In this case you might be right, but why would you want to??
To differentiate between normal keys and extended keys.
c = getch();
if (0 == c) /* extended key */
  c = -getch(); /* get the second byte of the keycode here */
Otherwise, some extended keycodes would look like "normal" keys.
 DVH> cprintf() is not borland specific.  It is in _ALL_ C libraries.
 DVH> MS-VC++, BC++ 4.0, BC/2 2.0, and the GCC C/C++ compiler.
Nope.  Not in _my_ gcc compiler.  (I use EMX)
It is NOT standard C, it is a somewhat common extention.
 DVH> The only time getch() works with printf() is when you are _using_
 DVH> a Borland compiler. I have all the known C compilers for OS/2 and DOS.
Try EMX 0.9c -> gcc 2.7.2.1
It isn't there.
---
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)

SOURCE: echomail via exec-pc

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