-> -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)
|